ETH Price: $3,436.91 (-1.42%)

Contract

0x5080a6A0F0b0E21A895841456e5Ed77d26332262
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Transaction Hash
Method
Block
From
To
Swap213826372024-12-11 23:46:5914 days ago1733960819IN
0x5080a6A0...d26332262
0 ETH0.0009203316.35135
Swap213567072024-12-08 8:54:3517 days ago1733648075IN
0x5080a6A0...d26332262
0 ETH0.000711829.7030831
Swap213193762024-12-03 3:45:2323 days ago1733197523IN
0x5080a6A0...d26332262
0 ETH0.0012984417.69654585
Swap213059572024-12-01 6:46:1124 days ago1733035571IN
0x5080a6A0...d26332262
0 ETH0.000481098.5492434
Swap212926392024-11-29 10:04:4726 days ago1732874687IN
0x5080a6A0...d26332262
0 ETH0.0007842510.656058
Swap212864282024-11-28 13:14:4727 days ago1732799687IN
0x5080a6A0...d26332262
0 ETH0.000639338.71210085
Swap212752372024-11-26 23:33:3529 days ago1732664015IN
0x5080a6A0...d26332262
0 ETH0.000559277.62106221
Swap212747442024-11-26 21:54:4729 days ago1732658087IN
0x5080a6A0...d26332262
0 ETH0.000633768.63763517
Swap212745852024-11-26 21:22:5929 days ago1732656179IN
0x5080a6A0...d26332262
0 ETH0.0008666711.05329271
Swap212300192024-11-20 16:03:5935 days ago1732118639IN
0x5080a6A0...d26332262
0 ETH0.0011383920.22562679
Swap212293112024-11-20 13:40:4735 days ago1732110047IN
0x5080a6A0...d26332262
0 ETH0.0011567815.7152518
Swap212115902024-11-18 2:23:4738 days ago1731896627IN
0x5080a6A0...d26332262
0 ETH0.0006169510.96128769
Swap212103802024-11-17 22:21:1138 days ago1731882071IN
0x5080a6A0...d26332262
0 ETH0.0006821812.12025442
Swap212088952024-11-17 17:23:1138 days ago1731864191IN
0x5080a6A0...d26332262
0 ETH0.0010511118.67481153
Swap212088002024-11-17 17:04:1138 days ago1731863051IN
0x5080a6A0...d26332262
0 ETH0.0009183316.31572065
Swap212059262024-11-17 7:26:3538 days ago1731828395IN
0x5080a6A0...d26332262
0 ETH0.0008024810.90381451
Swap211942672024-11-15 16:23:5940 days ago1731687839IN
0x5080a6A0...d26332262
0 ETH0.0021510929.31245845
Swap211934662024-11-15 13:43:3540 days ago1731678215IN
0x5080a6A0...d26332262
0 ETH0.0019340434.36160612
Swap211582632024-11-10 15:47:3545 days ago1731253655IN
0x5080a6A0...d26332262
0 ETH0.0015176520.6210951
Swap210147002024-10-21 14:57:5965 days ago1729522679IN
0x5080a6A0...d26332262
0 ETH0.0011045115.05344666
Swap209037132024-10-06 3:06:2381 days ago1728183983IN
0x5080a6A0...d26332262
0 ETH0.000441187.83841361
Swap206013012024-08-24 22:00:35123 days ago1724536835IN
0x5080a6A0...d26332262
0 ETH0.000116121.58238899
Swap205262892024-08-14 10:31:11133 days ago1723631471IN
0x5080a6A0...d26332262
0 ETH0.000187972.56154017
Swap203519002024-07-21 2:23:23158 days ago1721528603IN
0x5080a6A0...d26332262
0 ETH0.000144052.55936454
Swap203069732024-07-14 19:56:35164 days ago1720986995IN
0x5080a6A0...d26332262
0 ETH0.000245633.34715504
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OneToOneConvert

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : OneToOneConvert.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

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

contract OneToOneConvert {
    IERC20 public tokenA;
    IERC20 public tokenB;

    event Swap(address indexed sender, uint256 indexed amount);

    /// @param _tokenA The address of token A
    /// @param _tokenB The address of token B
    constructor(address _tokenA, address _tokenB) {
        tokenA = IERC20(_tokenA);
        tokenB = IERC20(_tokenB);
    }

    /// @notice Swap token A for token B
    /// @dev User must approve this contract to spend token A
    /// @param _amount The amount of token A to swap
    function swap(uint256 _amount) external {
        // burn token a
        tokenA.transferFrom(msg.sender, address(0x1), _amount);
        // send token b to user
        tokenB.transfer(msg.sender, _amount);

        emit Swap(msg.sender, _amount);
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swap","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenA","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenB","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516102f63803806102f683398101604081905261002f9161007c565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100af565b80516001600160a01b038116811461007757600080fd5b919050565b6000806040838503121561008f57600080fd5b61009883610060565b91506100a660208401610060565b90509250929050565b610238806100be6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630fc63d10146100465780635f64b55b1461007557806394b918de14610088575b600080fd5b600054610059906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b600154610059906001600160a01b031681565b61009b6100963660046101c0565b61009d565b005b6000546040516323b872dd60e01b815233600482015260016024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156100f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011991906101d9565b5060015460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561016b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018f91906101d9565b50604051819033907f562c219552544ec4c9d7a8eb850f80ea152973e315372bf4999fe7c953ea004f90600090a350565b6000602082840312156101d257600080fd5b5035919050565b6000602082840312156101eb57600080fd5b815180151581146101fb57600080fd5b939250505056fea2646970667358221220c1f7ce5d62b075fa48ef4d0b1cf062dec6234c6ce5740184def048516b214d9864736f6c63430008130033000000000000000000000000e3dbc4f88eaa632ddf9708732e2832eeaa6688ab0000000000000000000000008afe4055ebc86bd2afb3940c0095c9aca511d852

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630fc63d10146100465780635f64b55b1461007557806394b918de14610088575b600080fd5b600054610059906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b600154610059906001600160a01b031681565b61009b6100963660046101c0565b61009d565b005b6000546040516323b872dd60e01b815233600482015260016024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156100f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061011991906101d9565b5060015460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af115801561016b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018f91906101d9565b50604051819033907f562c219552544ec4c9d7a8eb850f80ea152973e315372bf4999fe7c953ea004f90600090a350565b6000602082840312156101d257600080fd5b5035919050565b6000602082840312156101eb57600080fd5b815180151581146101fb57600080fd5b939250505056fea2646970667358221220c1f7ce5d62b075fa48ef4d0b1cf062dec6234c6ce5740184def048516b214d9864736f6c63430008130033

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

000000000000000000000000e3dbc4f88eaa632ddf9708732e2832eeaa6688ab0000000000000000000000008afe4055ebc86bd2afb3940c0095c9aca511d852

-----Decoded View---------------
Arg [0] : _tokenA (address): 0xe3DBC4F88EAa632DDF9708732E2832EEaA6688AB
Arg [1] : _tokenB (address): 0x8AFE4055Ebc86Bd2AFB3940c0095C9aca511d852

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e3dbc4f88eaa632ddf9708732e2832eeaa6688ab
Arg [1] : 0000000000000000000000008afe4055ebc86bd2afb3940c0095c9aca511d852


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.