ETH Price: $3,689.10 (-6.18%)

Contract

0xd19005580660330D84aC6BE2e8926B3c50D6B95e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
182114472023-09-25 7:55:35450 days ago1695628535  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x5E1f0137...1c03d363E
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
OnchainGateway

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 2000 runs

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

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";


contract OnchainGateway {
    address public immutable onchainSwap;

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

    constructor(address _onchainSwap) {
        onchainSwap = _onchainSwap;
    }

    function claimTokens(
        address _token,
        address _from,
        uint256 _amount
    ) external onlyOnchainSwap {
        IERC20(_token).transferFrom(_from, onchainSwap, _amount );
    }
}

File 2 of 2 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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":"_onchainSwap","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":"onchainSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80632ec609031461003b5780639fc314c81461008b575b600080fd5b6100627f0000000000000000000000000425841529882628880fbd228ac90606e0c2e09a81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e610099366004610268565b6100a0565b005b7f0000000000000000000000000425841529882628880fbd228ac90606e0c2e09a73ffffffffffffffffffffffffffffffffffffffff163314610169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f53796d623a2063616c6c6572206973206e6f7420746865206f6e636861696e5360448201527f7761700000000000000000000000000000000000000000000000000000000000606482015260840160405180910390fd5b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f0000000000000000000000000425841529882628880fbd228ac90606e0c2e09a81166024830152604482018390528416906323b872dd90606401602060405180830381600087803b15801561020157600080fd5b505af1158015610215573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023991906102a4565b50505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461026357600080fd5b919050565b60008060006060848603121561027d57600080fd5b6102868461023f565b92506102946020850161023f565b9150604084013590509250925092565b6000602082840312156102b657600080fd5b815180151581146102c657600080fd5b939250505056fea2646970667358221220489f9ae0e5ff4d708afb664245d895032f4ff127fcb2102de46b4363065f699e64736f6c63430008070033

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.