More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 237757 | 228 days ago | IN | 0 ETH | 0.00079668 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
10092904 | 34 mins ago | 0.02342383 ETH | ||||
10092904 | 34 mins ago | 0.02342383 ETH | ||||
10092280 | 55 mins ago | 0.00030574 ETH | ||||
10092280 | 55 mins ago | 0.00030574 ETH | ||||
10092224 | 57 mins ago | 0.00000033 ETH | ||||
10092224 | 57 mins ago | 0.00000033 ETH | ||||
10092213 | 57 mins ago | 0.02673012 ETH | ||||
10092213 | 57 mins ago | 0.02673012 ETH | ||||
10090654 | 1 hr ago | 0.38702448 ETH | ||||
10090654 | 1 hr ago | 0.38702448 ETH | ||||
10090020 | 2 hrs ago | 0.00481945 ETH | ||||
10090020 | 2 hrs ago | 0.00481945 ETH | ||||
10089190 | 2 hrs ago | 0.00490589 ETH | ||||
10089190 | 2 hrs ago | 0.00490589 ETH | ||||
10089159 | 2 hrs ago | 0.00440532 ETH | ||||
10089159 | 2 hrs ago | 0.00440532 ETH | ||||
10089128 | 2 hrs ago | 0.00361041 ETH | ||||
10089128 | 2 hrs ago | 0.00361041 ETH | ||||
10087069 | 3 hrs ago | 0.02062522 ETH | ||||
10087069 | 3 hrs ago | 0.02062522 ETH | ||||
10083853 | 5 hrs ago | 0.00220104 ETH | ||||
10083853 | 5 hrs ago | 0.00220104 ETH | ||||
10081466 | 6 hrs ago | 0.01094663 ETH | ||||
10081466 | 6 hrs ago | 0.01094663 ETH | ||||
10070200 | 13 hrs ago | 0.14954272 ETH |
Loading...
Loading
Contract Name:
Unwrapper
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@uniswap/lib/contracts/libraries/TransferHelper.sol"; import "../synth-core/interfaces/IWrapper.sol"; /** * @title A contract that implements the unwrap and transfer logic */ contract Unwrapper is Context, Ownable { address public wrapper; event Unwrapped(uint256 amount, address indexed to); /** * CONSTRUCTOR */ constructor(address _wrapper) public { wrapper = _wrapper; } /** * @notice Set wrapper */ function setWrapper(address _newWrapper) external onlyOwner { wrapper = _newWrapper; } /** * @notice Implements an unwrap logic with transfer * @param _amountIn input amount * @param _to address to send gas token */ function unwrap( uint256 _amountIn, address _to ) external { TransferHelper.safeTransferFrom(wrapper, _msgSender(), address(this), _amountIn); IWrapper(wrapper).withdraw(_amountIn); TransferHelper.safeTransferETH(_to, _amountIn); emit Unwrapped(_amountIn, _to); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.0; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeApprove: approve failed' ); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransfer: transfer failed' ); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::transferFrom: transferFrom failed' ); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; interface IWrapper { function deposit() external payable; function withdraw(uint256 amount) external; }
{ "optimizer": { "enabled": true, "runs": 2000 }, "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":"_wrapper","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":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Unwrapped","type":"event"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newWrapper","type":"address"}],"name":"setWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516108b43803806108b483398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b6107c8806100ec6000396000f3fe6080604052600436106100695760003560e01c8063ac210cc711610043578063ac210cc7146100e2578063c2167d9314610102578063f2fde38b1461012257600080fd5b8063715018a6146100755780637647691d1461008c5780638da5cb5b146100ac57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b5061008a610142565b005b34801561009857600080fd5b5061008a6100a736600461072b565b6101ad565b3480156100b857600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b3480156100ee57600080fd5b506001546100c6906001600160a01b031681565b34801561010e57600080fd5b5061008a61011d3660046106e7565b61028d565b34801561012e57600080fd5b5061008a61013d3660046106e7565b610321565b6000546001600160a01b031633146101a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6101ab6000610403565b565b6001546101c5906001600160a01b031633308561046b565b6001546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b5050505061024681836105e3565b806001600160a01b03167f1d27d1c62712f590d53fa9eb8bbf3a75d09503deae319bb9d99644339cb312e18360405161028191815260200190565b60405180910390a25050565b6000546001600160a01b031633146102e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610198565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461037b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610198565b6001600160a01b0381166103f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610198565b61040081610403565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905291516000928392908816916104fd9190610757565b6000604051808303816000865af19150503d806000811461053a576040519150601f19603f3d011682016040523d82523d6000602084013e61053f565b606091505b50915091508180156105695750805115806105695750808060200190518101906105699190610709565b6105db5760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401610198565b505050505050565b604080516000808252602082019092526001600160a01b03841690839060405161060d9190610757565b60006040518083038185875af1925050503d806000811461064a576040519150601f19603f3d011682016040523d82523d6000602084013e61064f565b606091505b50509050806106c65760405162461bcd60e51b815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c65640000000000000000000000006064820152608401610198565b505050565b80356001600160a01b03811681146106e257600080fd5b919050565b6000602082840312156106f957600080fd5b610702826106cb565b9392505050565b60006020828403121561071b57600080fd5b8151801515811461070257600080fd5b6000806040838503121561073e57600080fd5b8235915061074e602084016106cb565b90509250929050565b6000825160005b81811015610778576020818601810151858301520161075e565b81811115610787576000828501525b50919091019291505056fea26469706673582212200e79dffe321a7bb0e7bddde5a23e98f01b0321b43c4a8b8b3da18b7d92bd5cf864736f6c634300080700330000000000000000000000004300000000000000000000000000000000000004
Deployed Bytecode
0x6080604052600436106100695760003560e01c8063ac210cc711610043578063ac210cc7146100e2578063c2167d9314610102578063f2fde38b1461012257600080fd5b8063715018a6146100755780637647691d1461008c5780638da5cb5b146100ac57600080fd5b3661007057005b600080fd5b34801561008157600080fd5b5061008a610142565b005b34801561009857600080fd5b5061008a6100a736600461072b565b6101ad565b3480156100b857600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b3480156100ee57600080fd5b506001546100c6906001600160a01b031681565b34801561010e57600080fd5b5061008a61011d3660046106e7565b61028d565b34801561012e57600080fd5b5061008a61013d3660046106e7565b610321565b6000546001600160a01b031633146101a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6101ab6000610403565b565b6001546101c5906001600160a01b031633308561046b565b6001546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b5050505061024681836105e3565b806001600160a01b03167f1d27d1c62712f590d53fa9eb8bbf3a75d09503deae319bb9d99644339cb312e18360405161028191815260200190565b60405180910390a25050565b6000546001600160a01b031633146102e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610198565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461037b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610198565b6001600160a01b0381166103f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610198565b61040081610403565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905291516000928392908816916104fd9190610757565b6000604051808303816000865af19150503d806000811461053a576040519150601f19603f3d011682016040523d82523d6000602084013e61053f565b606091505b50915091508180156105695750805115806105695750808060200190518101906105699190610709565b6105db5760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c65640000000000000000000000000000006064820152608401610198565b505050505050565b604080516000808252602082019092526001600160a01b03841690839060405161060d9190610757565b60006040518083038185875af1925050503d806000811461064a576040519150601f19603f3d011682016040523d82523d6000602084013e61064f565b606091505b50509050806106c65760405162461bcd60e51b815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c65640000000000000000000000006064820152608401610198565b505050565b80356001600160a01b03811681146106e257600080fd5b919050565b6000602082840312156106f957600080fd5b610702826106cb565b9392505050565b60006020828403121561071b57600080fd5b8151801515811461070257600080fd5b6000806040838503121561073e57600080fd5b8235915061074e602084016106cb565b90509250929050565b6000825160005b81811015610778576020818601810151858301520161075e565b81811115610787576000828501525b50919091019291505056fea26469706673582212200e79dffe321a7bb0e7bddde5a23e98f01b0321b43c4a8b8b3da18b7d92bd5cf864736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004300000000000000000000000000000000000004
-----Decoded View---------------
Arg [0] : _wrapper (address): 0x4300000000000000000000000000000000000004
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004300000000000000000000000000000000000004
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.