More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
11926420 | 1448 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xad0D55C7...0245872a4 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TokenPool
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-02-25 */ // File: node_modules\@openzeppelin\contracts\GSN\Context.sol // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin\contracts\access\Ownable.sol pragma solidity >=0.6.0 <0.8.0; /** * @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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: @openzeppelin\contracts\token\ERC20\IERC20.sol pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); } // File: contracts\TokenPool.sol pragma solidity 0.6.12; /** * @title A simple holder of tokens. * This is a simple contract to hold tokens. It's useful in the case where a separate contract * needs to hold multiple distinct pools of the same token. */ contract TokenPool is Ownable { IERC20 public token; constructor(IERC20 _token) public { token = _token; } function balance() public view returns (uint256) { return token.balanceOf(address(this)); } function transfer(address to, uint256 value) external onlyOwner returns (bool) { return token.transfer(to, value); } function rescueFunds(address tokenToRescue, address to, uint256 amount) external onlyOwner returns (bool) { require(address(token) != tokenToRescue, 'TokenPool: Cannot claim token held by the contract'); return IERC20(tokenToRescue).transfer(to, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_token","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"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"tokenToRescue","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFunds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a9059cbb1161005b578063a9059cbb146100fa578063b69ef8a814610126578063f2fde38b14610140578063fc0c546a146101665761007d565b80636ccae05414610082578063715018a6146100cc5780638da5cb5b146100d6575b600080fd5b6100b86004803603606081101561009857600080fd5b506001600160a01b0381358116916020810135909116906040013561016e565b604080519115158252519081900360200190f35b6100d46102a0565b005b6100de610342565b604080516001600160a01b039092168252519081900360200190f35b6100b86004803603604081101561011057600080fd5b506001600160a01b038135169060200135610351565b61012e610434565b60408051918252519081900360200190f35b6100d46004803603602081101561015657600080fd5b50356001600160a01b03166104b0565b6100de6105a8565b60006101786105b7565b6000546001600160a01b039081169116146101c8576040805162461bcd60e51b815260206004820181905260248201526000805160206105e2833981519152604482015290519081900360640190fd5b6001546001600160a01b03858116911614156102155760405162461bcd60e51b81526004018080602001828103825260328152602001806106026032913960400191505060405180910390fd5b836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561026c57600080fd5b505af1158015610280573d6000803e3d6000fd5b505050506040513d602081101561029657600080fd5b5051949350505050565b6102a86105b7565b6000546001600160a01b039081169116146102f8576040805162461bcd60e51b815260206004820181905260248201526000805160206105e2833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600061035b6105b7565b6000546001600160a01b039081169116146103ab576040805162461bcd60e51b815260206004820181905260248201526000805160206105e2833981519152604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561040157600080fd5b505af1158015610415573d6000803e3d6000fd5b505050506040513d602081101561042b57600080fd5b50519392505050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561047f57600080fd5b505afa158015610493573d6000803e3d6000fd5b505050506040513d60208110156104a957600080fd5b5051905090565b6104b86105b7565b6000546001600160a01b03908116911614610508576040805162461bcd60e51b815260206004820181905260248201526000805160206105e2833981519152604482015290519081900360640190fd5b6001600160a01b03811661054d5760405162461bcd60e51b81526004018080602001828103825260268152602001806105bc6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572546f6b656e506f6f6c3a2043616e6e6f7420636c61696d20746f6b656e2068656c642062792074686520636f6e7472616374a2646970667358221220d468a5853bba1191f181204aa0102bd71fdd88ccdd319cce3f402c9e381832b764736f6c634300060c0033
Deployed Bytecode Sourcemap
6414:675:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6805:281;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6805:281:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2781:148;;;:::i;:::-;;2139:79;;;:::i;:::-;;;;-1:-1:-1;;;;;2139:79:0;;;;;;;;;;;;;;6667:130;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6667:130:0;;;;;;;;:::i;6554:105::-;;;:::i;:::-;;;;;;;;;;;;;;;;3084:244;;;;;;;;;;;;;;;;-1:-1:-1;3084:244:0;-1:-1:-1;;;;;3084:244:0;;:::i;6451:19::-;;;:::i;6805:281::-;6905:4;2361:12;:10;:12::i;:::-;2351:6;;-1:-1:-1;;;;;2351:6:0;;;:22;;;2343:67;;;;;-1:-1:-1;;;2343:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2343:67:0;;;;;;;;;;;;;;;6938:5:::1;::::0;-1:-1:-1;;;;;6930:31:0;;::::1;6938:5:::0;::::1;6930:31;;6922:94;;;;-1:-1:-1::0;;;6922:94:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7043:13;-1:-1:-1::0;;;;;7036:30:0::1;;7067:2;7071:6;7036:42;;;;;;;;;;;;;-1:-1:-1::0;;;;;7036:42:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;7036:42:0;;6805:281;-1:-1:-1;;;;6805:281:0:o;2781:148::-;2361:12;:10;:12::i;:::-;2351:6;;-1:-1:-1;;;;;2351:6:0;;;:22;;;2343:67;;;;;-1:-1:-1;;;2343:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2343:67:0;;;;;;;;;;;;;;;2888:1:::1;2872:6:::0;;2851:40:::1;::::0;-1:-1:-1;;;;;2872:6:0;;::::1;::::0;2851:40:::1;::::0;2888:1;;2851:40:::1;2919:1;2902:19:::0;;-1:-1:-1;;;;;;2902:19:0::1;::::0;;2781:148::o;2139:79::-;2177:7;2204:6;-1:-1:-1;;;;;2204:6:0;2139:79;:::o;6667:130::-;6740:4;2361:12;:10;:12::i;:::-;2351:6;;-1:-1:-1;;;;;2351:6:0;;;:22;;;2343:67;;;;;-1:-1:-1;;;2343:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2343:67:0;;;;;;;;;;;;;;;6764:5:::1;::::0;:25:::1;::::0;;-1:-1:-1;;;6764:25:0;;-1:-1:-1;;;;;6764:25:0;;::::1;;::::0;::::1;::::0;;;;;;;;;:5;;;::::1;::::0;:14:::1;::::0;:25;;;;;::::1;::::0;;;;;;;;:5:::1;::::0;:25;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;6764:25:0;;6667:130;-1:-1:-1;;;6667:130:0:o;6554:105::-;6621:5;;:30;;;-1:-1:-1;;;6621:30:0;;6645:4;6621:30;;;;;;6594:7;;-1:-1:-1;;;;;6621:5:0;;:15;;:30;;;;;;;;;;;;;;:5;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6621:30:0;;-1:-1:-1;6554:105:0;:::o;3084:244::-;2361:12;:10;:12::i;:::-;2351:6;;-1:-1:-1;;;;;2351:6:0;;;:22;;;2343:67;;;;;-1:-1:-1;;;2343:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2343:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;3173:22:0;::::1;3165:73;;;;-1:-1:-1::0;;;3165:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3275:6;::::0;;3254:38:::1;::::0;-1:-1:-1;;;;;3254:38:0;;::::1;::::0;3275:6;::::1;::::0;3254:38:::1;::::0;::::1;3303:6;:17:::0;;-1:-1:-1;;;;;;3303:17:0::1;-1:-1:-1::0;;;;;3303:17:0;;;::::1;::::0;;;::::1;::::0;;3084:244::o;6451:19::-;;;-1:-1:-1;;;;;6451:19:0;;:::o;678:106::-;766:10;678:106;:::o
Swarm Source
ipfs://d468a5853bba1191f181204aa0102bd71fdd88ccdd319cce3f402c9e381832b7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.