Contract

0xb903716B3DD10b0115E93eb29D8Eb99e23336387

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-
Transaction Hash
Method
Block
From
To
Claim6584022024-12-19 4:57:422 mins ago1734584262IN
0xb903716B...e23336387
0 S0.004117985
Claim6582942024-12-19 4:56:003 mins ago1734584160IN
0xb903716B...e23336387
0 S0.000062951.11
Claim6582462024-12-19 4:55:224 mins ago1734584122IN
0xb903716B...e23336387
0 S0.000037051.11
Claim6570032024-12-19 4:34:5725 mins ago1734582897IN
0xb903716B...e23336387
0 S0.000864231.1
Claim6564682024-12-19 4:26:4433 mins ago1734582404IN
0xb903716B...e23336387
0 S0.000935691.11
Claim6564002024-12-19 4:25:5234 mins ago1734582352IN
0xb903716B...e23336387
0 S0.000052461.11
Claim6548962024-12-19 4:02:2457 mins ago1734580944IN
0xb903716B...e23336387
0 S0.000056231.2
Claim6530492024-12-19 3:39:051 hr ago1734579545IN
0xb903716B...e23336387
0 S0.000884311.1
Claim6528892024-12-19 3:37:001 hr ago1734579420IN
0xb903716B...e23336387
0 S0.00086541.1
Claim6528022024-12-19 3:35:561 hr ago1734579356IN
0xb903716B...e23336387
0 S0.000883051.1
Claim6523192024-12-19 3:30:111 hr ago1734579011IN
0xb903716B...e23336387
0 S0.000883141.1
Claim6513912024-12-19 3:18:051 hr ago1734578285IN
0xb903716B...e23336387
0 S0.000036491.11
Claim6513152024-12-19 3:17:151 hr ago1734578235IN
0xb903716B...e23336387
0 S0.000864221.1
Claim6511152024-12-19 3:14:461 hr ago1734578086IN
0xb903716B...e23336387
0 S0.000036491.11
Claim6509382024-12-19 3:12:281 hr ago1734577948IN
0xb903716B...e23336387
0 S0.000036211.11
Claim6508052024-12-19 3:10:401 hr ago1734577840IN
0xb903716B...e23336387
0 S0.000052511.11
Claim6507262024-12-19 3:09:371 hr ago1734577777IN
0xb903716B...e23336387
0 S0.000052331.11
Withdraw6504852024-12-19 3:05:521 hr ago1734577552IN
0xb903716B...e23336387
0 S0.000035371.11
Claim6504432024-12-19 3:05:221 hr ago1734577522IN
0xb903716B...e23336387
0 S0.000035821.11
Claim6493282024-12-19 2:52:132 hrs ago1734576733IN
0xb903716B...e23336387
0 S0.00018321.1
Claim6493172024-12-19 2:52:092 hrs ago1734576729IN
0xb903716B...e23336387
0 S0.000880641.1
Claim6492512024-12-19 2:51:422 hrs ago1734576702IN
0xb903716B...e23336387
0 S0.000920191.1
Claim6490772024-12-19 2:49:052 hrs ago1734576545IN
0xb903716B...e23336387
0 S0.000881991.1
Claim6452192024-12-19 1:49:073 hrs ago1734572947IN
0xb903716B...e23336387
0 S0.000884231.1
Claim6338332024-12-18 23:36:425 hrs ago1734565002IN
0xb903716B...e23336387
0 S0.00091711.11
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Bridge

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
File 1 of 8 : Bridge.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IStateOracle} from "./interfaces/IStateOracle.sol";
import {ITokenPairs} from "./interfaces/ITokenPairs.sol";
import {IProofVerifier} from "./interfaces/IProofVerifier.sol";
import {IProvingContract} from "./interfaces/IProvingContract.sol";
import {IMintedBurnableERC20} from "./interfaces/IMintedBurnableERC20.sol";

/// The L2 part of the bridge. Allows to claim tokens deposited on the L1 side.
/// Allows to initiate withdrawal from L2 back to L1.
/// @custom:security-contact [email protected]
contract Bridge is IProvingContract, Ownable {
    mapping (uint256 withdrawalId => bytes32 senderTokenAmount) public withdrawals; // slot index 1
    mapping (uint256 depositId => bool isClaimed) public claims; // slot index 2

    address public proofVerifier; // for verification of proofs of state on L1 chain
    address public deposit; // Deposit contract on the L1 chain
    address public immutable tokenPairs; // TokenPairs contract
    address public immutable stateOracle; // StateOracle contract

    uint256 private constant TIME_UNTIL_OFFLINE = 24 hours;

    event Withdrawal(uint256 indexed id, address indexed owner, address token, uint256 amount);
    event Claim(uint256 id, address indexed owner, address token, uint256 amount);
    event ProofVerifierSet(address proofVerifier);

    constructor(address _proofVerifier, address _tokenPairs, address _stateOracle, address _ownedBy) Ownable(_ownedBy) {
        require(_proofVerifier != address(0), "ProofVerifier not set");
        require(_tokenPairs != address(0), "TokenPairs not set");
        require(_stateOracle != address(0), "StateOracle not set");
        proofVerifier = _proofVerifier;
        tokenPairs = _tokenPairs;
        stateOracle = _stateOracle;
        // deposit addr not known while deploying Bridge
    }

    /// Initialize deposit contract address after the deployment.
    function setTokenDepositAddress(address _deposit) external onlyOwner {
        require(_deposit != address(0), "TokenDeposit address not set");
        require(deposit == address(0), "Address already set"); // callable only once, for init
        deposit = _deposit;
    }

    /// Claim minted tokens representing tokens deposited on L1.
    function claim(uint256 id, address token, uint256 amount, bytes calldata proof) external {
        require(claims[id] == false, "Already claimed");

        address mintedToken = ITokenPairs(tokenPairs).originalToMinted(token);
        require(mintedToken != address(0), "No minted token for given token");

        bytes32 depositHash = hash(msg.sender, token, amount);
        IProofVerifier(proofVerifier).verifyProof(
            deposit,
            getDepositSlotIndex(id),
            depositHash,
            IStateOracle(stateOracle).lastState(),
            proof
        );
        // the deposit exists on the L1

        claims[id] = true; // write before other contract call (reentrancy!)
        require(IMintedBurnableERC20(mintedToken).mint(msg.sender, amount), "Minting failed");
        emit Claim(id, msg.sender, token, amount);
    }

    /// Burn minted tokens to withdraw tokens deposited on L1.
    function withdraw(uint96 uid, address token, uint256 amount) external {
        uint256 id = userOperationId(msg.sender, uid);
        require(withdrawals[id] == 0, "Withdrawal id is already used");
        require(amount > 0, "No tokens to transfer");

        address mintedToken = ITokenPairs(tokenPairs).originalToMintedTerminable(token);
        require(mintedToken != address(0), "No minted token for given token");
        require(isOnline(), "Bridge is offline");

        withdrawals[id] = hash(msg.sender, token, amount); // write before other contract call (reentrancy!)
        IMintedBurnableERC20(mintedToken).burnFrom(msg.sender, amount);
        emit Withdrawal(id, msg.sender, token, amount);
    }

    function isOnline() private view returns (bool) {
        return IStateOracle(stateOracle).lastUpdateTime() >= block.timestamp - TIME_UNTIL_OFFLINE;
    }

    /// Calculate slotId for deposit in the Deposit L1 contract.
    function getDepositSlotIndex(uint256 id) pure public returns (bytes32) {
        return keccak256(abi.encode(id, uint8(7))); // deposits mapping is at slot index 7
    }

    /// Get deposit/withdrawal hash.
    function hash(address sender, address token, uint256 amount) pure public returns (bytes32) {
        return keccak256(abi.encode(sender, token, amount));
    }

    /// Calculate mapping key for user operation.
    /// Combines calling user identity and user-chosen value into a single key.
    function userOperationId(address sender, uint96 uid) pure public returns (uint256) {
        return (uint256(uint160(sender)) << 96) + uint256(uid);
    }

    /// Set new proof verifier
    function setProofVerifier(address _proofVerifier) external onlyOwner {
        require(_proofVerifier != address(0), "ProofVerifier set to zero");
        proofVerifier = _proofVerifier;
        emit ProofVerifierSet(_proofVerifier);
    }

    function setExitAdministrator(address) external view onlyOwner {
        revert("ExitAdministrator not relevant for Bridge contract");
    }
}

File 2 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 4 of 8 : IMintedBurnableERC20.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

/// Minted ERC-20 tokens represents an Ethereum ERC-20 tokens on L2.
interface IMintedBurnableERC20 {
    function mint(address account, uint256 amount) external returns (bool);
    function burn(uint256 value) external;
    function burnFrom(address account, uint256 value) external;
}

File 5 of 8 : IProofVerifier.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

/// Proof verifier allows to validate witness proof about a storage slot value on a different chain.
interface IProofVerifier {

    /// Verify witness proof - proof about storage slot value on a different chain.
    /// Reverts if the slot value does not match the expected value or if the proof is invalid.
    function verifyProof(address contractAddress, bytes32 slotIndex, bytes32 expectedValue, bytes32 stateRoot, bytes calldata proof) external view;

}

File 6 of 8 : IProvingContract.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

/// Proving contract represents a contract which use the proof verifier.
/// Used for updating the proof verifier address.
interface IProvingContract {
    function proofVerifier() external view returns(address);
    function setProofVerifier(address proofVerifier) external;
    function setExitAdministrator(address exitAdministrator) external;
}

File 7 of 8 : IStateOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

/// State oracle provides the hash of a different chain state.
interface IStateOracle {
    function lastState() external view returns (bytes32);
    function lastBlockNum() external view returns (uint256);
    function lastUpdateTime() external view returns (uint256);
    function chainId() external view returns (uint256);

    function update(uint256 blockNum, bytes32 stateRoot) external;
}

File 8 of 8 : ITokenPairs.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

// The token pairs registry maps Ethereum ERC-20 tokens to L2 tokens minted by the bridge.
interface ITokenPairs {
    /// Map Ethereum token to L2 token - pairs can be only added into this mapping.
    function originalToMinted(address) external view returns (address);

    /// Map Ethereum token to L2 token - pairs can be removed from here to block new transfers.
    function originalToMintedTerminable(address) external view returns (address);

    /// Map L2 token to Ethereum token - pairs can be only added into this mapping.
    function mintedToOriginal(address) external view returns (address);

    /// Check if the account has given role - allows to use TokenPairs as an AccessManager for USDC burning ops.
    function hasRole(bytes32 role, address account) external view returns (bool);
}

Settings
{
  "evmVersion": "cancun",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_proofVerifier","type":"address"},{"internalType":"address","name":"_tokenPairs","type":"address"},{"internalType":"address","name":"_stateOracle","type":"address"},{"internalType":"address","name":"_ownedBy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"proofVerifier","type":"address"}],"name":"ProofVerifierSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"depositId","type":"uint256"}],"name":"claims","outputs":[{"internalType":"bool","name":"isClaimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getDepositSlotIndex","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"setExitAdministrator","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_proofVerifier","type":"address"}],"name":"setProofVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_deposit","type":"address"}],"name":"setTokenDepositAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stateOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint96","name":"uid","type":"uint96"}],"name":"userOperationId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint96","name":"uid","type":"uint96"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"withdrawalId","type":"uint256"}],"name":"withdrawals","outputs":[{"internalType":"bytes32","name":"senderTokenAmount","type":"bytes32"}],"stateMutability":"view","type":"function"}]

60c060405234801561000f575f5ffd5b506040516111df3803806111df83398101604081905261002e916101f4565b806001600160a01b03811661005d57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6100668161018a565b506001600160a01b0384166100bd5760405162461bcd60e51b815260206004820152601560248201527f50726f6f665665726966696572206e6f742073657400000000000000000000006044820152606401610054565b6001600160a01b0383166101085760405162461bcd60e51b8152602060048201526012602482015271151bdad95b94185a5c9cc81b9bdd081cd95d60721b6044820152606401610054565b6001600160a01b03821661015e5760405162461bcd60e51b815260206004820152601360248201527f53746174654f7261636c65206e6f7420736574000000000000000000000000006044820152606401610054565b50600380546001600160a01b0319166001600160a01b039485161790559082166080521660a052610245565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146101ef575f5ffd5b919050565b5f5f5f5f60808587031215610207575f5ffd5b610210856101d9565b935061021e602086016101d9565b925061022c604086016101d9565b915061023a606086016101d9565b905092959194509250565b60805160a051610f5d6102825f395f81816101520152818161089b0152610c3c01525f818161010e0152818161053d015261077d0152610f5d5ff3fe608060405234801561000f575f5ffd5b5060043610610105575f3560e01c80637fa417b31161009e578063d0e30db01161006e578063d0e30db01461025f578063d609a7bb14610272578063df6244db146102ac578063eb8006f7146102bf578063f2fde38b146102d2575f5ffd5b80637fa417b3146101f75780638da5cb5b1461020a578063990161421461021a578063a888c2cd1461022d575f5ffd5b806364e927a8116100d957806364e927a8146101b45780636951588b146101c9578063715018a6146101dc5780637542cda8146101e4575f5ffd5b8062d4601414610109578063076d27f51461014d57806335a6821c146101745780635cc0707614610195575b5f5ffd5b6101307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101307f000000000000000000000000000000000000000000000000000000000000000081565b610187610182366004610cf5565b6102e5565b604051908152602001610144565b6101876101a3366004610d28565b60016020525f908152604090205481565b6101c76101c2366004610d3f565b61031a565b005b6101c76101d7366004610d3f565b6103ee565b6101c7610459565b6101c76101f2366004610d61565b61046c565b600354610130906001600160a01b031681565b5f546001600160a01b0316610130565b6101c7610228366004610d9d565b61070c565b61024f61023b366004610d28565b60026020525f908152604090205460ff1681565b6040519015158152602001610144565b600454610130906001600160a01b031681565b610187610280366004610d28565b604080516020808201939093526007818301528151808203830181526060909101909152805191012090565b6101c76102ba366004610d3f565b610a7f565b6101876102cd366004610e2d565b610b31565b6101c76102e0366004610d3f565b610b74565b5f6103116bffffffffffffffffffffffff83166bffffffffffffffffffffffff19606086901b16610e5e565b90505b92915050565b610322610bb1565b6001600160a01b03811661037d5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e4465706f7369742061646472657373206e6f74207365740000000060448201526064015b60405180910390fd5b6004546001600160a01b0316156103cc5760405162461bcd60e51b81526020600482015260136024820152721059191c995cdcc8185b1c9958591e481cd95d606a1b6044820152606401610374565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6103f6610bb1565b60405162461bcd60e51b815260206004820152603260248201527f4578697441646d696e6973747261746f72206e6f742072656c6576616e7420666044820152711bdc88109c9a5919d94818dbdb9d1c9858dd60721b6064820152608401610374565b610461610bb1565b61046a5f610bdd565b565b5f61047733856102e5565b5f81815260016020526040902054909150156104d55760405162461bcd60e51b815260206004820152601d60248201527f5769746864726177616c20696420697320616c726561647920757365640000006044820152606401610374565b5f821161051c5760405162461bcd60e51b81526020600482015260156024820152742737903a37b5b2b739903a37903a3930b739b332b960591b6044820152606401610374565b604051634b0f53e960e01b81526001600160a01b0384811660048301525f917f000000000000000000000000000000000000000000000000000000000000000090911690634b0f53e990602401602060405180830381865afa158015610584573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a89190610e71565b90506001600160a01b0381166106005760405162461bcd60e51b815260206004820152601f60248201527f4e6f206d696e74656420746f6b656e20666f7220676976656e20746f6b656e006044820152606401610374565b610608610c2c565b6106485760405162461bcd60e51b8152602060048201526011602482015270427269646765206973206f66666c696e6560781b6044820152606401610374565b610653338585610b31565b5f8381526001602052604090819020919091555163079cc67960e41b8152336004820152602481018490526001600160a01b038216906379cc6790906044015f604051808303815f87803b1580156106a9575f5ffd5b505af11580156106bb573d5f5f3e3d5ffd5b5050604080516001600160a01b0388168152602081018790523393508592507fcf91346356075a3baa53cd15dff800c671dccf78e18140c685232e8ab7566592910160405180910390a35050505050565b5f8581526002602052604090205460ff161561075c5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610374565b60405163fe2f9dd760e01b81526001600160a01b0385811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063fe2f9dd790602401602060405180830381865afa1580156107c4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e89190610e71565b90506001600160a01b0381166108405760405162461bcd60e51b815260206004820152601f60248201527f4e6f206d696e74656420746f6b656e20666f7220676976656e20746f6b656e006044820152606401610374565b5f61084c338787610b31565b6003546004549192506001600160a01b0390811691636a5310d091166108988a604080516020808201939093526007818301528151808203830181526060909101909152805191012090565b847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632df802806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108f5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109199190610e8c565b89896040518763ffffffff1660e01b815260040161093c96959493929190610ea3565b5f6040518083038186803b158015610952575f5ffd5b505afa158015610964573d5f5f3e3d5ffd5b5050505f8881526002602052604090819020805460ff19166001179055516340c10f1960e01b8152336004820152602481018790526001600160a01b03841691506340c10f19906044016020604051808303815f875af11580156109ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109ee9190610ef5565b610a2b5760405162461bcd60e51b815260206004820152600e60248201526d135a5b9d1a5b99c819985a5b195960921b6044820152606401610374565b604080518881526001600160a01b038816602082015290810186905233907fa27580a77a01c86ee8598d930ae5f9a0ec6f146c6e0e9e9f50b95bacb33787189060600160405180910390a250505050505050565b610a87610bb1565b6001600160a01b038116610add5760405162461bcd60e51b815260206004820152601960248201527f50726f6f6656657269666965722073657420746f207a65726f000000000000006044820152606401610374565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37b8cc6237b398b43a500bcd66f67e927875d57cd10fde544af9cf61a1639e99060200160405180910390a150565b604080516001600160a01b039485166020808301919091529390941684820152606080850192909252805180850390920182526080909301909252815191012090565b610b7c610bb1565b6001600160a01b038116610ba557604051631e4fbdf760e01b81525f6004820152602401610374565b610bae81610bdd565b50565b5f546001600160a01b0316331461046a5760405163118cdaa760e01b8152336004820152602401610374565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f610c3a6201518042610f14565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c8f33c916040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c96573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cba9190610e8c565b1015905090565b6001600160a01b0381168114610bae575f5ffd5b80356bffffffffffffffffffffffff81168114610cf0575f5ffd5b919050565b5f5f60408385031215610d06575f5ffd5b8235610d1181610cc1565b9150610d1f60208401610cd5565b90509250929050565b5f60208284031215610d38575f5ffd5b5035919050565b5f60208284031215610d4f575f5ffd5b8135610d5a81610cc1565b9392505050565b5f5f5f60608486031215610d73575f5ffd5b610d7c84610cd5565b92506020840135610d8c81610cc1565b929592945050506040919091013590565b5f5f5f5f5f60808688031215610db1575f5ffd5b853594506020860135610dc381610cc1565b935060408601359250606086013567ffffffffffffffff811115610de5575f5ffd5b8601601f81018813610df5575f5ffd5b803567ffffffffffffffff811115610e0b575f5ffd5b886020828401011115610e1c575f5ffd5b959894975092955050506020019190565b5f5f5f60608486031215610e3f575f5ffd5b8335610d7c81610cc1565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561031457610314610e4a565b5f60208284031215610e81575f5ffd5b8151610d5a81610cc1565b5f60208284031215610e9c575f5ffd5b5051919050565b60018060a01b038716815285602082015284604082015283606082015260a060808201528160a0820152818360c08301375f81830160c090810191909152601f909201601f1916010195945050505050565b5f60208284031215610f05575f5ffd5b81518015158114610d5a575f5ffd5b8181038181111561031457610314610e4a56fea2646970667358221220712b0fbf22a8441e92991814ab6119565eb330df699ba741c7e857d479769b0464736f6c634300081b00330000000000000000000000006aba65dc38e6ae9ed0d95eb67bf1b524c1e3036a0000000000000000000000009171aca775a164ca906ac7f50a3844b7c6f13d34000000000000000000000000b1703ad070241c862be4053dd9c8440e689c5df900000000000000000000000080957d62c7cc252e5dd2f8691a9afb3087f88fa1

Deployed Bytecode

0x608060405234801561000f575f5ffd5b5060043610610105575f3560e01c80637fa417b31161009e578063d0e30db01161006e578063d0e30db01461025f578063d609a7bb14610272578063df6244db146102ac578063eb8006f7146102bf578063f2fde38b146102d2575f5ffd5b80637fa417b3146101f75780638da5cb5b1461020a578063990161421461021a578063a888c2cd1461022d575f5ffd5b806364e927a8116100d957806364e927a8146101b45780636951588b146101c9578063715018a6146101dc5780637542cda8146101e4575f5ffd5b8062d4601414610109578063076d27f51461014d57806335a6821c146101745780635cc0707614610195575b5f5ffd5b6101307f0000000000000000000000009171aca775a164ca906ac7f50a3844b7c6f13d3481565b6040516001600160a01b0390911681526020015b60405180910390f35b6101307f000000000000000000000000b1703ad070241c862be4053dd9c8440e689c5df981565b610187610182366004610cf5565b6102e5565b604051908152602001610144565b6101876101a3366004610d28565b60016020525f908152604090205481565b6101c76101c2366004610d3f565b61031a565b005b6101c76101d7366004610d3f565b6103ee565b6101c7610459565b6101c76101f2366004610d61565b61046c565b600354610130906001600160a01b031681565b5f546001600160a01b0316610130565b6101c7610228366004610d9d565b61070c565b61024f61023b366004610d28565b60026020525f908152604090205460ff1681565b6040519015158152602001610144565b600454610130906001600160a01b031681565b610187610280366004610d28565b604080516020808201939093526007818301528151808203830181526060909101909152805191012090565b6101c76102ba366004610d3f565b610a7f565b6101876102cd366004610e2d565b610b31565b6101c76102e0366004610d3f565b610b74565b5f6103116bffffffffffffffffffffffff83166bffffffffffffffffffffffff19606086901b16610e5e565b90505b92915050565b610322610bb1565b6001600160a01b03811661037d5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e4465706f7369742061646472657373206e6f74207365740000000060448201526064015b60405180910390fd5b6004546001600160a01b0316156103cc5760405162461bcd60e51b81526020600482015260136024820152721059191c995cdcc8185b1c9958591e481cd95d606a1b6044820152606401610374565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6103f6610bb1565b60405162461bcd60e51b815260206004820152603260248201527f4578697441646d696e6973747261746f72206e6f742072656c6576616e7420666044820152711bdc88109c9a5919d94818dbdb9d1c9858dd60721b6064820152608401610374565b610461610bb1565b61046a5f610bdd565b565b5f61047733856102e5565b5f81815260016020526040902054909150156104d55760405162461bcd60e51b815260206004820152601d60248201527f5769746864726177616c20696420697320616c726561647920757365640000006044820152606401610374565b5f821161051c5760405162461bcd60e51b81526020600482015260156024820152742737903a37b5b2b739903a37903a3930b739b332b960591b6044820152606401610374565b604051634b0f53e960e01b81526001600160a01b0384811660048301525f917f0000000000000000000000009171aca775a164ca906ac7f50a3844b7c6f13d3490911690634b0f53e990602401602060405180830381865afa158015610584573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a89190610e71565b90506001600160a01b0381166106005760405162461bcd60e51b815260206004820152601f60248201527f4e6f206d696e74656420746f6b656e20666f7220676976656e20746f6b656e006044820152606401610374565b610608610c2c565b6106485760405162461bcd60e51b8152602060048201526011602482015270427269646765206973206f66666c696e6560781b6044820152606401610374565b610653338585610b31565b5f8381526001602052604090819020919091555163079cc67960e41b8152336004820152602481018490526001600160a01b038216906379cc6790906044015f604051808303815f87803b1580156106a9575f5ffd5b505af11580156106bb573d5f5f3e3d5ffd5b5050604080516001600160a01b0388168152602081018790523393508592507fcf91346356075a3baa53cd15dff800c671dccf78e18140c685232e8ab7566592910160405180910390a35050505050565b5f8581526002602052604090205460ff161561075c5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610374565b60405163fe2f9dd760e01b81526001600160a01b0385811660048301525f917f0000000000000000000000009171aca775a164ca906ac7f50a3844b7c6f13d349091169063fe2f9dd790602401602060405180830381865afa1580156107c4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e89190610e71565b90506001600160a01b0381166108405760405162461bcd60e51b815260206004820152601f60248201527f4e6f206d696e74656420746f6b656e20666f7220676976656e20746f6b656e006044820152606401610374565b5f61084c338787610b31565b6003546004549192506001600160a01b0390811691636a5310d091166108988a604080516020808201939093526007818301528151808203830181526060909101909152805191012090565b847f000000000000000000000000b1703ad070241c862be4053dd9c8440e689c5df96001600160a01b0316632df802806040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108f5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109199190610e8c565b89896040518763ffffffff1660e01b815260040161093c96959493929190610ea3565b5f6040518083038186803b158015610952575f5ffd5b505afa158015610964573d5f5f3e3d5ffd5b5050505f8881526002602052604090819020805460ff19166001179055516340c10f1960e01b8152336004820152602481018790526001600160a01b03841691506340c10f19906044016020604051808303815f875af11580156109ca573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109ee9190610ef5565b610a2b5760405162461bcd60e51b815260206004820152600e60248201526d135a5b9d1a5b99c819985a5b195960921b6044820152606401610374565b604080518881526001600160a01b038816602082015290810186905233907fa27580a77a01c86ee8598d930ae5f9a0ec6f146c6e0e9e9f50b95bacb33787189060600160405180910390a250505050505050565b610a87610bb1565b6001600160a01b038116610add5760405162461bcd60e51b815260206004820152601960248201527f50726f6f6656657269666965722073657420746f207a65726f000000000000006044820152606401610374565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37b8cc6237b398b43a500bcd66f67e927875d57cd10fde544af9cf61a1639e99060200160405180910390a150565b604080516001600160a01b039485166020808301919091529390941684820152606080850192909252805180850390920182526080909301909252815191012090565b610b7c610bb1565b6001600160a01b038116610ba557604051631e4fbdf760e01b81525f6004820152602401610374565b610bae81610bdd565b50565b5f546001600160a01b0316331461046a5760405163118cdaa760e01b8152336004820152602401610374565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f610c3a6201518042610f14565b7f000000000000000000000000b1703ad070241c862be4053dd9c8440e689c5df96001600160a01b031663c8f33c916040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c96573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cba9190610e8c565b1015905090565b6001600160a01b0381168114610bae575f5ffd5b80356bffffffffffffffffffffffff81168114610cf0575f5ffd5b919050565b5f5f60408385031215610d06575f5ffd5b8235610d1181610cc1565b9150610d1f60208401610cd5565b90509250929050565b5f60208284031215610d38575f5ffd5b5035919050565b5f60208284031215610d4f575f5ffd5b8135610d5a81610cc1565b9392505050565b5f5f5f60608486031215610d73575f5ffd5b610d7c84610cd5565b92506020840135610d8c81610cc1565b929592945050506040919091013590565b5f5f5f5f5f60808688031215610db1575f5ffd5b853594506020860135610dc381610cc1565b935060408601359250606086013567ffffffffffffffff811115610de5575f5ffd5b8601601f81018813610df5575f5ffd5b803567ffffffffffffffff811115610e0b575f5ffd5b886020828401011115610e1c575f5ffd5b959894975092955050506020019190565b5f5f5f60608486031215610e3f575f5ffd5b8335610d7c81610cc1565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561031457610314610e4a565b5f60208284031215610e81575f5ffd5b8151610d5a81610cc1565b5f60208284031215610e9c575f5ffd5b5051919050565b60018060a01b038716815285602082015284604082015283606082015260a060808201528160a0820152818360c08301375f81830160c090810191909152601f909201601f1916010195945050505050565b5f60208284031215610f05575f5ffd5b81518015158114610d5a575f5ffd5b8181038181111561031457610314610e4a56fea2646970667358221220712b0fbf22a8441e92991814ab6119565eb330df699ba741c7e857d479769b0464736f6c634300081b0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000006aba65dc38e6ae9ed0d95eb67bf1b524c1e3036a0000000000000000000000009171aca775a164ca906ac7f50a3844b7c6f13d34000000000000000000000000b1703ad070241c862be4053dd9c8440e689c5df900000000000000000000000080957d62c7cc252e5dd2f8691a9afb3087f88fa1

-----Decoded View---------------
Arg [0] : _proofVerifier (address): 0x6aba65dc38E6AE9ed0d95EB67Bf1B524C1e3036A
Arg [1] : _tokenPairs (address): 0x9171aca775a164CA906ac7F50A3844B7C6F13d34
Arg [2] : _stateOracle (address): 0xb1703AD070241C862be4053dd9C8440E689C5df9
Arg [3] : _ownedBy (address): 0x80957D62C7Cc252E5dd2f8691a9afB3087f88Fa1

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000006aba65dc38e6ae9ed0d95eb67bf1b524c1e3036a
Arg [1] : 0000000000000000000000009171aca775a164ca906ac7f50a3844b7c6f13d34
Arg [2] : 000000000000000000000000b1703ad070241c862be4053dd9c8440e689c5df9
Arg [3] : 00000000000000000000000080957d62c7cc252e5dd2f8691a9afb3087f88fa1


Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.