More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 90 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Swap Token | 17420548 | 566 days ago | IN | 0 ETH | 0.00303277 | ||||
Swap Token | 16554891 | 688 days ago | IN | 0 ETH | 0.00280211 | ||||
Swap Token | 16553105 | 688 days ago | IN | 0 ETH | 0.00321962 | ||||
Swap Token | 16545041 | 689 days ago | IN | 0 ETH | 0.00633054 | ||||
Swap Token | 16519925 | 693 days ago | IN | 0 ETH | 0.00226548 | ||||
Swap Token | 16519861 | 693 days ago | IN | 0 ETH | 0.00233419 | ||||
Swap Token | 16478727 | 698 days ago | IN | 0 ETH | 0.00296388 | ||||
Swap Token | 16474899 | 699 days ago | IN | 0 ETH | 0.00209286 | ||||
Swap Token | 16474895 | 699 days ago | IN | 0 ETH | 0.00222362 | ||||
Swap Token | 16474873 | 699 days ago | IN | 0 ETH | 0.00234144 | ||||
Swap Token | 16474870 | 699 days ago | IN | 0 ETH | 0.0022584 | ||||
Swap Token | 16474842 | 699 days ago | IN | 0 ETH | 0.0025476 | ||||
Swap Token | 16472352 | 699 days ago | IN | 0 ETH | 0.00308151 | ||||
Swap Token | 16471366 | 699 days ago | IN | 0 ETH | 0.00486618 | ||||
Swap Token | 16471361 | 699 days ago | IN | 0 ETH | 0.00582096 | ||||
Swap Token | 16429617 | 705 days ago | IN | 0 ETH | 0.00424429 | ||||
Swap Token | 16423313 | 706 days ago | IN | 0 ETH | 0.00306541 | ||||
Swap Token | 16415083 | 707 days ago | IN | 0 ETH | 0.00521965 | ||||
Swap Token | 16369074 | 714 days ago | IN | 0 ETH | 0.0025477 | ||||
Swap Token | 16366417 | 714 days ago | IN | 0 ETH | 0.00328624 | ||||
Swap Token | 16355789 | 716 days ago | IN | 0 ETH | 0.00296679 | ||||
Swap Token | 16323344 | 720 days ago | IN | 0 ETH | 0.00241862 | ||||
Swap Token | 16250485 | 730 days ago | IN | 0 ETH | 0.00419091 | ||||
Swap Token | 16235191 | 732 days ago | IN | 0 ETH | 0.00217274 | ||||
Swap Token | 16215072 | 735 days ago | IN | 0 ETH | 0.0016911 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CrybMigration
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract CrybMigration { event OwnershipTransferred (address indexed previousOwner, address indexed newOwner); event TokenSwapped (address indexed account, uint256 indexed v1Amount, uint256 indexed v2Amount, uint256 swapTime); address public owner; IERC20 public crybTokenV1; IERC20 public crybTokenV2; modifier onlyOwner { require(msg.sender == owner, "Ownable: caller is not a owner"); _; } constructor (IERC20 _crybTokenV1, IERC20 _crybTokenV2) { owner = msg.sender; crybTokenV1 = _crybTokenV1; crybTokenV2 = _crybTokenV2; } function swapToken(uint256 amount) external returns(bool) { require(amount >= 10**9,"Swapping: Amount less than minimum swap amount"); crybTokenV1.transferFrom(msg.sender, address(this), amount); uint256 v2TokenAmt = amount / 10**9 ; crybTokenV2.transfer(msg.sender, v2TokenAmt); emit TokenSwapped(msg.sender, amount, v2TokenAmt, block.timestamp); return true; } function transferOwnership(address newOwner) external onlyOwner returns(bool) { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; return true; } function recoverETH(uint256 amount) external onlyOwner { payable(owner).transfer(amount); } function recoverToken(address tokenAddress, uint256 amount) external onlyOwner { IERC20(tokenAddress).transfer(owner, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "byzantium", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_crybTokenV1","type":"address"},{"internalType":"contract IERC20","name":"_crybTokenV2","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"v1Amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"v2Amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"swapTime","type":"uint256"}],"name":"TokenSwapped","type":"event"},{"inputs":[],"name":"crybTokenV1","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crybTokenV2","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516107ac3803806107ac83398101604081905261002f91610087565b60008054600160a060020a0319908116331790915560018054600160a060020a03948516908316179055600280549290931691161790556100ba565b8051600160a060020a038116811461008257600080fd5b919050565b6000806040838503121561009a57600080fd5b6100a38361006b565b91506100b16020840161006b565b90509250929050565b6106e3806100c96000396000f3fe608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100785780638da5cb5b14610105578063b29a814014610118578063d33355531461012d578063f2fde38b1461014057600080fd5b8063159835451461009f5780633f27661a146100cf5780634bbf3a7a146100e2575b600080fd5b6001546100b290600160a060020a031681565b604051600160a060020a0390911681526020015b60405180910390f35b6002546100b290600160a060020a031681565b6100f56100f036600461059d565b610153565b60405190151581526020016100c6565b6000546100b290600160a060020a031681565b61012b6101263660046105cd565b61035a565b005b61012b61013b36600461059d565b61041c565b6100f561014e3660046105f7565b610486565b6000633b9aca008210156101d75760405160e560020a62461bcd02815260206004820152602e60248201527f5377617070696e673a20416d6f756e74206c657373207468616e206d696e696d60448201527f756d207377617020616d6f756e7400000000000000000000000000000000000060648201526084015b60405180910390fd5b6001546040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101849052600160a060020a03909116906323b872dd906064016020604051808303816000875af1158015610247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026b9190610619565b50600061027c633b9aca008461063b565b6002546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101839052919250600160a060020a03169063a9059cbb906044016020604051808303816000875af11580156102e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030b9190610619565b50808333600160a060020a03167fd0dfdc42f329395b5b942c700951e54f587bd4bb1f893019dd09d857c2b5ad7f4260405161034991815260200190565b60405180910390a450600192915050565b600054600160a060020a031633146103875760405160e560020a62461bcd0281526004016101ce90610676565b6000546040517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039182166004820152602481018390529083169063a9059cbb906044016020604051808303816000875af11580156103f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104179190610619565b505050565b600054600160a060020a031633146104495760405160e560020a62461bcd0281526004016101ce90610676565b60008054604051600160a060020a039091169183156108fc02918491818181858888f19350505050158015610482573d6000803e3d6000fd5b5050565b60008054600160a060020a031633146104b45760405160e560020a62461bcd0281526004016101ce90610676565b600160a060020a0382166105335760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101ce565b60008054604051600160a060020a03808616939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3506000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905560015b919050565b6000602082840312156105af57600080fd5b5035919050565b8035600160a060020a038116811461059857600080fd5b600080604083850312156105e057600080fd5b6105e9836105b6565b946020939093013593505050565b60006020828403121561060957600080fd5b610612826105b6565b9392505050565b60006020828403121561062b57600080fd5b8151801515811461061257600080fd5b600082610671577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6020808252601e908201527f4f776e61626c653a2063616c6c6572206973206e6f742061206f776e6572000060408201526060019056fea2646970667358221220796461b1ebf251a39e95d2520d50c2331847bdf92349f95af3a2d1080b16c30864736f6c634300081000330000000000000000000000005362799f2228a180b03a68fd41cd39137dd99c420000000000000000000000001fbf62e93d19509ca1ce628666b8cc4bad2106f9
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100785780638da5cb5b14610105578063b29a814014610118578063d33355531461012d578063f2fde38b1461014057600080fd5b8063159835451461009f5780633f27661a146100cf5780634bbf3a7a146100e2575b600080fd5b6001546100b290600160a060020a031681565b604051600160a060020a0390911681526020015b60405180910390f35b6002546100b290600160a060020a031681565b6100f56100f036600461059d565b610153565b60405190151581526020016100c6565b6000546100b290600160a060020a031681565b61012b6101263660046105cd565b61035a565b005b61012b61013b36600461059d565b61041c565b6100f561014e3660046105f7565b610486565b6000633b9aca008210156101d75760405160e560020a62461bcd02815260206004820152602e60248201527f5377617070696e673a20416d6f756e74206c657373207468616e206d696e696d60448201527f756d207377617020616d6f756e7400000000000000000000000000000000000060648201526084015b60405180910390fd5b6001546040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101849052600160a060020a03909116906323b872dd906064016020604051808303816000875af1158015610247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026b9190610619565b50600061027c633b9aca008461063b565b6002546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101839052919250600160a060020a03169063a9059cbb906044016020604051808303816000875af11580156102e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030b9190610619565b50808333600160a060020a03167fd0dfdc42f329395b5b942c700951e54f587bd4bb1f893019dd09d857c2b5ad7f4260405161034991815260200190565b60405180910390a450600192915050565b600054600160a060020a031633146103875760405160e560020a62461bcd0281526004016101ce90610676565b6000546040517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039182166004820152602481018390529083169063a9059cbb906044016020604051808303816000875af11580156103f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104179190610619565b505050565b600054600160a060020a031633146104495760405160e560020a62461bcd0281526004016101ce90610676565b60008054604051600160a060020a039091169183156108fc02918491818181858888f19350505050158015610482573d6000803e3d6000fd5b5050565b60008054600160a060020a031633146104b45760405160e560020a62461bcd0281526004016101ce90610676565b600160a060020a0382166105335760405160e560020a62461bcd02815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101ce565b60008054604051600160a060020a03808616939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3506000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905560015b919050565b6000602082840312156105af57600080fd5b5035919050565b8035600160a060020a038116811461059857600080fd5b600080604083850312156105e057600080fd5b6105e9836105b6565b946020939093013593505050565b60006020828403121561060957600080fd5b610612826105b6565b9392505050565b60006020828403121561062b57600080fd5b8151801515811461061257600080fd5b600082610671577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6020808252601e908201527f4f776e61626c653a2063616c6c6572206973206e6f742061206f776e6572000060408201526060019056fea2646970667358221220796461b1ebf251a39e95d2520d50c2331847bdf92349f95af3a2d1080b16c30864736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005362799f2228a180b03a68fd41cd39137dd99c420000000000000000000000001fbf62e93d19509ca1ce628666b8cc4bad2106f9
-----Decoded View---------------
Arg [0] : _crybTokenV1 (address): 0x5362799F2228A180b03A68FD41CD39137dD99C42
Arg [1] : _crybTokenV2 (address): 0x1FBf62e93d19509Ca1cE628666B8cc4baD2106F9
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005362799f2228a180b03a68fd41cd39137dd99c42
Arg [1] : 0000000000000000000000001fbf62e93d19509ca1ce628666b8cc4bad2106f9
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.