ETH Price: $3,309.75 (-3.21%)
Gas: 17 Gwei

Contract

0x03B7551EB0162c838a10c2437b60D1f5455b9554
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
147534632022-05-11 7:11:28784 days ago1652253088  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MetaRouterGateway

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 2 : MetaRouterGateway.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@uniswap/lib/contracts/libraries/TransferHelper.sol";

/**
 * @title MetaRouterGateway
 * @notice During the `metaRoute` transaction `MetaRouter` (only) claims user's tokens
 * from `MetaRoutetGateway` contract and then operates with them.
 */
contract MetaRouterGateway {
    address public immutable metaRouter;

    modifier onlyMetarouter() {
        require(metaRouter == msg.sender, "Symb: caller is not the metarouter");
        _;
    }

    constructor(address _metaRouter) {
        metaRouter = _metaRouter;
    }

    function claimTokens(
        address _token,
        address _from,
        uint256 _amount
    ) external onlyMetarouter {
        TransferHelper.safeTransferFrom(_token, _from, metaRouter, _amount);
    }
}

File 2 of 2 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_metaRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metaRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b506040516104d03803806104d083398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516104396100976000396000818160550152818160a2015261017101526104396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80639fc314c81461003b578063dbec15bb14610050575b600080fd5b61004e610049366004610363565b6100a0565b005b6100777f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16331461016a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53796d623a2063616c6c6572206973206e6f7420746865206d657461726f757460448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61019683837f00000000000000000000000000000000000000000000000000000000000000008461019b565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161023a919061039f565b6000604051808303816000865af19150503d8060008114610277576040519150601f19603f3d011682016040523d82523d6000602084013e61027c565b606091505b50915091508180156102a65750805115806102a65750808060200190518101906102a691906103da565b610332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401610161565b505050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461035e57600080fd5b919050565b60008060006060848603121561037857600080fd5b6103818461033a565b925061038f6020850161033a565b9150604084013590509250925092565b6000825160005b818110156103c057602081860181015185830152016103a6565b818111156103cf576000828501525b509190910192915050565b6000602082840312156103ec57600080fd5b815180151581146103fc57600080fd5b939250505056fea26469706673582212202cd6ac3fbe807d5dff29d8e687a3d6bfcc72a63c84781d24f85c2ebf35d4bae164736f6c634300080b0033000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c15

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80639fc314c81461003b578063dbec15bb14610050575b600080fd5b61004e610049366004610363565b6100a0565b005b6100777f000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c1581565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b7f000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c1573ffffffffffffffffffffffffffffffffffffffff16331461016a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53796d623a2063616c6c6572206973206e6f7420746865206d657461726f757460448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61019683837f000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c158461019b565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052915160009283929088169161023a919061039f565b6000604051808303816000865af19150503d8060008114610277576040519150601f19603f3d011682016040523d82523d6000602084013e61027c565b606091505b50915091508180156102a65750805115806102a65750808060200190518101906102a691906103da565b610332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401610161565b505050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461035e57600080fd5b919050565b60008060006060848603121561037857600080fd5b6103818461033a565b925061038f6020850161033a565b9150604084013590509250925092565b6000825160005b818110156103c057602081860181015185830152016103a6565b818111156103cf576000828501525b509190910192915050565b6000602082840312156103ec57600080fd5b815180151581146103fc57600080fd5b939250505056fea26469706673582212202cd6ac3fbe807d5dff29d8e687a3d6bfcc72a63c84781d24f85c2ebf35d4bae164736f6c634300080b0033

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

000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c15

-----Decoded View---------------
Arg [0] : _metaRouter (address): 0xB9E13785127BFfCc3dc970A55F6c7bF0844a3C15

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b9e13785127bffcc3dc970a55f6c7bf0844a3c15


Block Transaction Difficulty 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
Loading...
Loading
[ 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.