Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 130 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Wrap | 20411660 | 24 days ago | IN | 0 ETH | 0.00015194 | ||||
Wrap | 20386617 | 28 days ago | IN | 0 ETH | 0.00015718 | ||||
Unwrap | 20223686 | 51 days ago | IN | 0 ETH | 0.00030232 | ||||
Unwrap | 20218143 | 51 days ago | IN | 0 ETH | 0.00039608 | ||||
Wrap | 20215998 | 52 days ago | IN | 0 ETH | 0.00035485 | ||||
Wrap | 20215904 | 52 days ago | IN | 0 ETH | 0.00017342 | ||||
Wrap | 20215783 | 52 days ago | IN | 0 ETH | 0.00020841 | ||||
Wrap | 20215606 | 52 days ago | IN | 0 ETH | 0.00017478 | ||||
Wrap | 20215595 | 52 days ago | IN | 0 ETH | 0.00018883 | ||||
Wrap | 20215368 | 52 days ago | IN | 0 ETH | 0.00020371 | ||||
Wrap | 20212671 | 52 days ago | IN | 0 ETH | 0.00111739 | ||||
Wrap | 20212525 | 52 days ago | IN | 0 ETH | 0.00126192 | ||||
Wrap | 20166525 | 59 days ago | IN | 0 ETH | 0.00033897 | ||||
Unwrap | 19936405 | 91 days ago | IN | 0 ETH | 0.00060635 | ||||
Wrap | 19905621 | 95 days ago | IN | 0 ETH | 0.00032978 | ||||
Unwrap | 19758538 | 116 days ago | IN | 0 ETH | 0.00064384 | ||||
Unwrap | 19750586 | 117 days ago | IN | 0 ETH | 0.00052296 | ||||
Unwrap | 19717173 | 121 days ago | IN | 0 ETH | 0.00073443 | ||||
Unwrap | 19717168 | 121 days ago | IN | 0 ETH | 0.00075991 | ||||
Unwrap | 19716752 | 122 days ago | IN | 0 ETH | 0.00076238 | ||||
Unwrap | 19716742 | 122 days ago | IN | 0 ETH | 0.00084256 | ||||
Unwrap | 19716739 | 122 days ago | IN | 0 ETH | 0.00089891 | ||||
Unwrap | 19716641 | 122 days ago | IN | 0 ETH | 0.00078741 | ||||
Unwrap | 19716624 | 122 days ago | IN | 0 ETH | 0.00086759 | ||||
Unwrap | 19716602 | 122 days ago | IN | 0 ETH | 0.00088792 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
GnomeWrapper
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract GnomeWrapper { IERC20 public gnomeToken = IERC20(0x42069d11A2CC72388a2e06210921E839Cfbd3280); IERC20 public gnomeWhormHoleToken = IERC20(0xa29F2f60aA589B2dac72e72b7CFed51bfbA52862); uint256 public wrapFee = 100; // Fee for wrapping in basis points (1% = 100) uint256 public unwrapFee = 5000; // Fee for unwrapping in basis points (1% = 100) address public owner; modifier onlyOwner() { require(msg.sender == owner, "Not the owner"); _; } event Wrap(address indexed account, uint256 amount, uint256 fee); event Unwrap(address indexed account, uint256 amount, uint256 fee); constructor() { owner = msg.sender; } function setGnomeToken(address _gnomeToken) external onlyOwner { gnomeToken = IERC20(_gnomeToken); } function setGnomeWhormHoleToken(address _gnomeWhormHoleToken) external onlyOwner { gnomeWhormHoleToken = IERC20(_gnomeWhormHoleToken); } function setWrapFee(uint256 _wrapFee) external onlyOwner { require(_wrapFee <= 10000, "Wrap fee must be less than or equal to 100%"); wrapFee = _wrapFee; } function setUnwrapFee(uint256 _unwrapFee) external onlyOwner { require(_unwrapFee <= 10000, "Unwrap fee must be less than or equal to 100%"); unwrapFee = _unwrapFee; } function wrap(uint256 amount) external { require(address(gnomeToken) != address(0), "GnomeToken address not set"); require(address(gnomeWhormHoleToken) != address(0), "GnomeWhormHoleToken address not set"); uint256 feeAmount = (amount * wrapFee) / 10000; uint256 transferAmount = amount - feeAmount; transferAmount *= 10 ** 9; require(gnomeToken.transferFrom(msg.sender, address(this), amount * 10 ** 18), "Transfer failed"); gnomeWhormHoleToken.transfer(msg.sender, transferAmount); emit Wrap(msg.sender, amount, feeAmount); } function unwrap(uint256 amount) external { require(address(gnomeToken) != address(0), "GnomeToken address not set"); require(address(gnomeWhormHoleToken) != address(0), "GnomeWhormHoleToken address not set"); uint256 feeAmount = (amount * unwrapFee) / 10000; uint256 transferAmount = amount - feeAmount; transferAmount *= 10 ** 18; require(gnomeWhormHoleToken.transferFrom(msg.sender, address(this), amount * 10 ** 9), "Transfer failed"); gnomeToken.transfer(msg.sender, transferAmount); emit Unwrap(msg.sender, amount, feeAmount); } // Owner functions for emergency recovery function recoverERC20(address token, uint256 amount) external onlyOwner { IERC20(token).transfer(owner, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Unwrap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Wrap","type":"event"},{"inputs":[],"name":"gnomeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gnomeWhormHoleToken","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":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gnomeToken","type":"address"}],"name":"setGnomeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gnomeWhormHoleToken","type":"address"}],"name":"setGnomeWhormHoleToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_unwrapFee","type":"uint256"}],"name":"setUnwrapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wrapFee","type":"uint256"}],"name":"setWrapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unwrapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600080546001600160a01b03199081167342069d11a2cc72388a2e06210921e839cfbd3280179091556001805490911673a29f2f60aa589b2dac72e72b7cfed51bfba52862179055606460025561138860035534801561006357600080fd5b50600480546001600160a01b03191633179055610a6d806100856000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b1461014e5780639637e4a8146101615780639aed427914610174578063c2c569b11461017d578063de0e9a3e14610190578063ea598cb0146101a357600080fd5b80630aabe407146100b95780632653908c146100ce5780632aafb3eb146100e15780633cf6eed8146100fd57806386136c6d146101285780638980f11f1461013b575b600080fd5b6100cc6100c73660046108de565b6101b6565b005b6100cc6100dc3660046108de565b61020b565b6100ea60025481565b6040519081526020015b60405180910390f35b600054610110906001600160a01b031681565b6040516001600160a01b0390911681526020016100f4565b600154610110906001600160a01b031681565b6100cc610149366004610900565b610257565b600454610110906001600160a01b031681565b6100cc61016f36600461092a565b6102ff565b6100ea60035481565b6100cc61018b36600461092a565b610396565b6100cc61019e36600461092a565b61042b565b6100cc6101b136600461092a565b61067b565b6004546001600160a01b031633146101e95760405162461bcd60e51b81526004016101e090610943565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031633146102355760405162461bcd60e51b81526004016101e090610943565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031633146102815760405162461bcd60e51b81526004016101e090610943565b6004805460405163a9059cbb60e01b81526001600160a01b03918216928101929092526024820183905283169063a9059cbb906044016020604051808303816000875af11580156102d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fa919061096a565b505050565b6004546001600160a01b031633146103295760405162461bcd60e51b81526004016101e090610943565b6127108111156103915760405162461bcd60e51b815260206004820152602d60248201527f556e7772617020666565206d757374206265206c657373207468616e206f722060448201526c657175616c20746f203130302560981b60648201526084016101e0565b600355565b6004546001600160a01b031633146103c05760405162461bcd60e51b81526004016101e090610943565b6127108111156104265760405162461bcd60e51b815260206004820152602b60248201527f5772617020666565206d757374206265206c657373207468616e206f7220657160448201526a75616c20746f203130302560a81b60648201526084016101e0565b600255565b6000546001600160a01b03166104835760405162461bcd60e51b815260206004820152601a60248201527f476e6f6d65546f6b656e2061646472657373206e6f742073657400000000000060448201526064016101e0565b6001546001600160a01b03166104ab5760405162461bcd60e51b81526004016101e09061098c565b6000612710600354836104be91906109e5565b6104c89190610a02565b905060006104d68284610a24565b90506104ea670de0b6b3a7640000826109e5565b6001549091506001600160a01b03166323b872dd333061050e87633b9aca006109e5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610562573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610586919061096a565b6105c45760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101e0565b60005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610615573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610639919061096a565b50604080518481526020810184905233917fe8e8d3915b94f03b4f3342716334ae94bd6f36775da7b263c908889b93d0574b91015b60405180910390a2505050565b6000546001600160a01b03166106d35760405162461bcd60e51b815260206004820152601a60248201527f476e6f6d65546f6b656e2061646472657373206e6f742073657400000000000060448201526064016101e0565b6001546001600160a01b03166106fb5760405162461bcd60e51b81526004016101e09061098c565b60006127106002548361070e91906109e5565b6107189190610a02565b905060006107268284610a24565b9050610736633b9aca00826109e5565b6000549091506001600160a01b03166323b872dd333061075e87670de0b6b3a76400006109e5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af11580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d6919061096a565b6108145760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101e0565b60015460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610865573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610889919061096a565b50604080518481526020810184905233917f18a5ed48bb0a697c64a5aef8f28cec1f29ab01da27a45c5f835099781ef1ea46910161066e565b80356001600160a01b03811681146108d957600080fd5b919050565b6000602082840312156108f057600080fd5b6108f9826108c2565b9392505050565b6000806040838503121561091357600080fd5b61091c836108c2565b946020939093013593505050565b60006020828403121561093c57600080fd5b5035919050565b6020808252600d908201526c2737ba103a34329037bbb732b960991b604082015260600190565b60006020828403121561097c57600080fd5b815180151581146108f957600080fd5b60208082526023908201527f476e6f6d6557686f726d486f6c65546f6b656e2061646472657373206e6f74206040820152621cd95d60ea1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109fc576109fc6109cf565b92915050565b600082610a1f57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156109fc576109fc6109cf56fea2646970667358221220db3717c3fb427a35814c81e089b47da09fe4c025d22adcad483aee555171495464736f6c63430008150033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80638da5cb5b116100715780638da5cb5b1461014e5780639637e4a8146101615780639aed427914610174578063c2c569b11461017d578063de0e9a3e14610190578063ea598cb0146101a357600080fd5b80630aabe407146100b95780632653908c146100ce5780632aafb3eb146100e15780633cf6eed8146100fd57806386136c6d146101285780638980f11f1461013b575b600080fd5b6100cc6100c73660046108de565b6101b6565b005b6100cc6100dc3660046108de565b61020b565b6100ea60025481565b6040519081526020015b60405180910390f35b600054610110906001600160a01b031681565b6040516001600160a01b0390911681526020016100f4565b600154610110906001600160a01b031681565b6100cc610149366004610900565b610257565b600454610110906001600160a01b031681565b6100cc61016f36600461092a565b6102ff565b6100ea60035481565b6100cc61018b36600461092a565b610396565b6100cc61019e36600461092a565b61042b565b6100cc6101b136600461092a565b61067b565b6004546001600160a01b031633146101e95760405162461bcd60e51b81526004016101e090610943565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031633146102355760405162461bcd60e51b81526004016101e090610943565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031633146102815760405162461bcd60e51b81526004016101e090610943565b6004805460405163a9059cbb60e01b81526001600160a01b03918216928101929092526024820183905283169063a9059cbb906044016020604051808303816000875af11580156102d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fa919061096a565b505050565b6004546001600160a01b031633146103295760405162461bcd60e51b81526004016101e090610943565b6127108111156103915760405162461bcd60e51b815260206004820152602d60248201527f556e7772617020666565206d757374206265206c657373207468616e206f722060448201526c657175616c20746f203130302560981b60648201526084016101e0565b600355565b6004546001600160a01b031633146103c05760405162461bcd60e51b81526004016101e090610943565b6127108111156104265760405162461bcd60e51b815260206004820152602b60248201527f5772617020666565206d757374206265206c657373207468616e206f7220657160448201526a75616c20746f203130302560a81b60648201526084016101e0565b600255565b6000546001600160a01b03166104835760405162461bcd60e51b815260206004820152601a60248201527f476e6f6d65546f6b656e2061646472657373206e6f742073657400000000000060448201526064016101e0565b6001546001600160a01b03166104ab5760405162461bcd60e51b81526004016101e09061098c565b6000612710600354836104be91906109e5565b6104c89190610a02565b905060006104d68284610a24565b90506104ea670de0b6b3a7640000826109e5565b6001549091506001600160a01b03166323b872dd333061050e87633b9aca006109e5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610562573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610586919061096a565b6105c45760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101e0565b60005460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610615573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610639919061096a565b50604080518481526020810184905233917fe8e8d3915b94f03b4f3342716334ae94bd6f36775da7b263c908889b93d0574b91015b60405180910390a2505050565b6000546001600160a01b03166106d35760405162461bcd60e51b815260206004820152601a60248201527f476e6f6d65546f6b656e2061646472657373206e6f742073657400000000000060448201526064016101e0565b6001546001600160a01b03166106fb5760405162461bcd60e51b81526004016101e09061098c565b60006127106002548361070e91906109e5565b6107189190610a02565b905060006107268284610a24565b9050610736633b9aca00826109e5565b6000549091506001600160a01b03166323b872dd333061075e87670de0b6b3a76400006109e5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af11580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d6919061096a565b6108145760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016101e0565b60015460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610865573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610889919061096a565b50604080518481526020810184905233917f18a5ed48bb0a697c64a5aef8f28cec1f29ab01da27a45c5f835099781ef1ea46910161066e565b80356001600160a01b03811681146108d957600080fd5b919050565b6000602082840312156108f057600080fd5b6108f9826108c2565b9392505050565b6000806040838503121561091357600080fd5b61091c836108c2565b946020939093013593505050565b60006020828403121561093c57600080fd5b5035919050565b6020808252600d908201526c2737ba103a34329037bbb732b960991b604082015260600190565b60006020828403121561097c57600080fd5b815180151581146108f957600080fd5b60208082526023908201527f476e6f6d6557686f726d486f6c65546f6b656e2061646472657373206e6f74206040820152621cd95d60ea1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109fc576109fc6109cf565b92915050565b600082610a1f57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156109fc576109fc6109cf56fea2646970667358221220db3717c3fb427a35814c81e089b47da09fe4c025d22adcad483aee555171495464736f6c63430008150033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.000217 | 4,559,125.2914 | $988.97 |
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.