More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 518 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap | 21382637 | 14 days ago | IN | 0 ETH | 0.00092033 | ||||
Swap | 21356707 | 17 days ago | IN | 0 ETH | 0.00071182 | ||||
Swap | 21319376 | 23 days ago | IN | 0 ETH | 0.00129844 | ||||
Swap | 21305957 | 24 days ago | IN | 0 ETH | 0.00048109 | ||||
Swap | 21292639 | 26 days ago | IN | 0 ETH | 0.00078425 | ||||
Swap | 21286428 | 27 days ago | IN | 0 ETH | 0.00063933 | ||||
Swap | 21275237 | 29 days ago | IN | 0 ETH | 0.00055927 | ||||
Swap | 21274744 | 29 days ago | IN | 0 ETH | 0.00063376 | ||||
Swap | 21274585 | 29 days ago | IN | 0 ETH | 0.00086667 | ||||
Swap | 21230019 | 35 days ago | IN | 0 ETH | 0.00113839 | ||||
Swap | 21229311 | 35 days ago | IN | 0 ETH | 0.00115678 | ||||
Swap | 21211590 | 38 days ago | IN | 0 ETH | 0.00061695 | ||||
Swap | 21210380 | 38 days ago | IN | 0 ETH | 0.00068218 | ||||
Swap | 21208895 | 38 days ago | IN | 0 ETH | 0.00105111 | ||||
Swap | 21208800 | 38 days ago | IN | 0 ETH | 0.00091833 | ||||
Swap | 21205926 | 38 days ago | IN | 0 ETH | 0.00080248 | ||||
Swap | 21194267 | 40 days ago | IN | 0 ETH | 0.00215109 | ||||
Swap | 21193466 | 40 days ago | IN | 0 ETH | 0.00193404 | ||||
Swap | 21158263 | 45 days ago | IN | 0 ETH | 0.00151765 | ||||
Swap | 21014700 | 65 days ago | IN | 0 ETH | 0.00110451 | ||||
Swap | 20903713 | 81 days ago | IN | 0 ETH | 0.00044118 | ||||
Swap | 20601301 | 123 days ago | IN | 0 ETH | 0.00011612 | ||||
Swap | 20526289 | 133 days ago | IN | 0 ETH | 0.00018797 | ||||
Swap | 20351900 | 158 days ago | IN | 0 ETH | 0.00014405 | ||||
Swap | 20306973 | 164 days ago | IN | 0 ETH | 0.00024563 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
OneToOneConvert
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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); } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
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.