Superform v1
  • Introduction
  • Components
    • Protocol
    • Keepers
    • API
    • App
  • E2E Flows
    • Same-chain Deposit
    • Cross-chain Deposit
    • Same-chain Withdrawal
    • Cross-chain Withdrawal
  • Periphery Contracts
    • SuperformRouter
      • SuperformRouterPlus
      • SuperformRouterPlusAsync
    • PayMaster
    • PaymentHelper
    • EmergencyQueue
    • SuperformFactory
    • Forms
      • ERC4626Form
      • ERC5115Form
      • ERC7540Form
    • SuperPositions
      • ERC1155A
    • RewardsDistributor
  • Core Contracts
    • State Registries
      • CoreStateRegistry
      • AsyncStateRegistry
      • PayloadHelper
    • AMB Implementations
      • LayerzeroImplementation
      • LayerzeroV2Implementation
      • WormholeARImplementation
      • HyperlaneImplementation
      • AxelarImplementation
    • Broadcasting
      • BroadcastRegistry
      • WormholeSRImplementation
    • Bridge Validators
      • LiFiValidator
      • SocketValidator
      • SocketOneInchValidator
      • DebridgeValidator (and forwarder)
      • OneInchValidator
    • DstSwapper
    • Settings
      • SuperRBAC
      • SuperRegistry
  • SuperVaults
    • SuperVaults
  • Resources
    • Deployment Addresses
    • Subgraphs
      • Protocol Level Entities
      • Form Related Entities
      • Deposits and Withdrawals
      • SuperPosition Events
      • External Entities
    • Infrastructure Integrations
    • Security & Audits
    • Protocol License
    • Glossary
    • Protocol Multisig
    • Superform Labs Socials
Powered by GitBook
On this page
  • Introduction
  • Core Concepts

Was this helpful?

  1. Core Contracts
  2. Bridge Validators

SocketOneInchValidator

Last updated 9 months ago

Was this helpful?

Introduction

Socket 1inch validator implements BridgeValidator to allow same-chain transaction data generated by the to be verified for validity on-chain. It ensures that submitted transaction data has the intended bridging outcome and was not corrupted in generation or in the process of transmitting through the Superform API.

Core Concepts

Same chain swap requests can be decoded through Socket's 1Inch Implementation.

// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.4;

/// @title ISocketOneInchImpl
/// @notice Interface for Socket's One Inch Impl
/// @notice used for swaps without bridge
/// @notice taken from https://polygonscan.com/address/0x2ddf16BA6d0180e5357d5e170eF1917a01b41fc0
interface ISocketOneInchImpl {
    struct SwapInput {
        address fromToken;
        address toToken;
        address receiver;
        uint256 amount;
        bytes swapExtraData;
    }

    function performDirectAction(
        address fromToken,
        address toToken,
        address receiver,
        uint256 amount,
        bytes memory swapExtraData
    )
        external
        payable;
}
Socket v1 API