Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
10970196 | 1528 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
DODORewardVault
Compiler Version
v0.6.9+commit.3e3065ac
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-10-01 */ // File: contracts/lib/Ownable.sol /* Copyright 2020 DODO ZOO. SPDX-License-Identifier: Apache-2.0 */ pragma solidity 0.6.9; pragma experimental ABIEncoderV2; /** * @title Ownable * @author DODO Breeder * * @notice Ownership related functions */ contract Ownable { address public _OWNER_; address public _NEW_OWNER_; // ============ Events ============ event OwnershipTransferPrepared(address indexed previousOwner, address indexed newOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // ============ Modifiers ============ modifier onlyOwner() { require(msg.sender == _OWNER_, "NOT_OWNER"); _; } // ============ Functions ============ constructor() internal { _OWNER_ = msg.sender; emit OwnershipTransferred(address(0), _OWNER_); } function transferOwnership(address newOwner) external onlyOwner { require(newOwner != address(0), "INVALID_OWNER"); emit OwnershipTransferPrepared(_OWNER_, newOwner); _NEW_OWNER_ = newOwner; } function claimOwnership() external { require(msg.sender == _NEW_OWNER_, "INVALID_CLAIM"); emit OwnershipTransferred(_OWNER_, _NEW_OWNER_); _OWNER_ = _NEW_OWNER_; _NEW_OWNER_ = address(0); } } // File: contracts/intf/IERC20.sol // This is a file copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol /** * @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); function decimals() external view returns (uint8); function name() external view returns (string memory); /** * @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); } // File: contracts/lib/SafeMath.sol /* Copyright 2020 DODO ZOO. */ /** * @title SafeMath * @author DODO Breeder * * @notice Math operations with safety checks that revert on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "MUL_ERROR"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "DIVIDING_ERROR"); return a / b; } function divCeil(uint256 a, uint256 b) internal pure returns (uint256) { uint256 quotient = div(a, b); uint256 remainder = a - quotient * b; if (remainder > 0) { return quotient + 1; } else { return quotient; } } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SUB_ERROR"); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "ADD_ERROR"); return c; } function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = x / 2 + 1; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } // File: contracts/lib/SafeERC20.sol /* Copyright 2020 DODO ZOO. This is a simplified version of OpenZepplin's SafeERC20 library */ /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn( token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value) ); } function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/token/DODORewardVault.sol /* Copyright 2020 DODO ZOO. */ interface IDODORewardVault { function reward(address to, uint256 amount) external; } contract DODORewardVault is Ownable { using SafeERC20 for IERC20; address public dodoToken; constructor(address _dodoToken) public { dodoToken = _dodoToken; } function reward(address to, uint256 amount) external onlyOwner { IERC20(dodoToken).safeTransfer(to, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_dodoToken","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":"OwnershipTransferPrepared","type":"event"},{"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":"_NEW_OWNER_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_OWNER_","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dodoToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161068638038061068683398101604081905261002f9161009d565b600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600280546001600160a01b0319166001600160a01b03929092169190911790556100cb565b6000602082840312156100ae578081fd5b81516001600160a01b03811681146100c4578182fd5b9392505050565b6105ac806100da6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806316048bc41461006757806321670f22146100855780634e71e0c81461009a57806375123ff9146100a25780638456db15146100aa578063f2fde38b146100b2575b600080fd5b61006f6100c5565b60405161007c9190610459565b60405180910390f35b6100986100933660046103d6565b6100d4565b005b610098610128565b61006f6101b6565b61006f6101c5565b6100986100c03660046103b4565b6101d4565b6000546001600160a01b031681565b6000546001600160a01b031633146101075760405162461bcd60e51b81526004016100fe90610509565b60405180910390fd5b600254610124906001600160a01b0316838363ffffffff61027f16565b5050565b6001546001600160a01b031633146101525760405162461bcd60e51b81526004016100fe90610486565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6001546001600160a01b031681565b6000546001600160a01b031633146101fe5760405162461bcd60e51b81526004016100fe90610509565b6001600160a01b0381166102245760405162461bcd60e51b81526004016100fe906104e2565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6102d58363a9059cbb60e01b848460405160240161029e92919061046d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526102da565b505050565b60006060836001600160a01b0316836040516102f69190610420565b6000604051808303816000865af19150503d8060008114610333576040519150601f19603f3d011682016040523d82523d6000602084013e610338565b606091505b50915091508161035a5760405162461bcd60e51b81526004016100fe906104ad565b80511561039157808060200190518101906103759190610400565b6103915760405162461bcd60e51b81526004016100fe9061052c565b50505050565b80356001600160a01b03811681146103ae57600080fd5b92915050565b6000602082840312156103c5578081fd5b6103cf8383610397565b9392505050565b600080604083850312156103e8578081fd5b6103f28484610397565b946020939093013593505050565b600060208284031215610411578081fd5b815180151581146103cf578182fd5b60008251815b818110156104405760208186018101518583015201610426565b8181111561044e5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b60608201526080019056fea2646970667358221220ef58be852af0c74d1fffbe345875ca42a7e339c35b79546168f52cb1dc23fe5764736f6c6343000609003300000000000000000000000043dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c806316048bc41461006757806321670f22146100855780634e71e0c81461009a57806375123ff9146100a25780638456db15146100aa578063f2fde38b146100b2575b600080fd5b61006f6100c5565b60405161007c9190610459565b60405180910390f35b6100986100933660046103d6565b6100d4565b005b610098610128565b61006f6101b6565b61006f6101c5565b6100986100c03660046103b4565b6101d4565b6000546001600160a01b031681565b6000546001600160a01b031633146101075760405162461bcd60e51b81526004016100fe90610509565b60405180910390fd5b600254610124906001600160a01b0316838363ffffffff61027f16565b5050565b6001546001600160a01b031633146101525760405162461bcd60e51b81526004016100fe90610486565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6001546001600160a01b031681565b6000546001600160a01b031633146101fe5760405162461bcd60e51b81526004016100fe90610509565b6001600160a01b0381166102245760405162461bcd60e51b81526004016100fe906104e2565b600080546040516001600160a01b03808516939216917fdcf55418cee3220104fef63f979ff3c4097ad240c0c43dcb33ce837748983e6291a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6102d58363a9059cbb60e01b848460405160240161029e92919061046d565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526102da565b505050565b60006060836001600160a01b0316836040516102f69190610420565b6000604051808303816000865af19150503d8060008114610333576040519150601f19603f3d011682016040523d82523d6000602084013e610338565b606091505b50915091508161035a5760405162461bcd60e51b81526004016100fe906104ad565b80511561039157808060200190518101906103759190610400565b6103915760405162461bcd60e51b81526004016100fe9061052c565b50505050565b80356001600160a01b03811681146103ae57600080fd5b92915050565b6000602082840312156103c5578081fd5b6103cf8383610397565b9392505050565b600080604083850312156103e8578081fd5b6103f28484610397565b946020939093013593505050565b600060208284031215610411578081fd5b815180151581146103cf578182fd5b60008251815b818110156104405760208186018101518583015201610426565b8181111561044e5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252600d908201526c494e56414c49445f434c41494d60981b604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252600d908201526c24a72b20a624a22fa7aba722a960991b604082015260600190565b6020808252600990820152682727aa2fa7aba722a960b91b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b60608201526080019056fea2646970667358221220ef58be852af0c74d1fffbe345875ca42a7e339c35b79546168f52cb1dc23fe5764736f6c63430006090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000043dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd
-----Decoded View---------------
Arg [0] : _dodoToken (address): 0x43Dfc4159D86F3A37A5A4B3D4580b888ad7d4DDd
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000043dfc4159d86f3a37a5a4b3d4580b888ad7d4ddd
Deployed Bytecode Sourcemap
8895:326:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;306:22;;;:::i;:::-;;;;;;;;;;;;;;;;9094:124;;;;;;;;;:::i;:::-;;1156:230;;;:::i;8973:24::-;;;:::i;335:26::-;;;:::i;924:224::-;;;;;;;;;:::i;306:22::-;;;-1:-1:-1;;;;;306:22:0;;:::o;9094:124::-;702:7;;-1:-1:-1;;;;;702:7:0;688:10;:21;680:43;;;;-1:-1:-1;;;680:43:0;;;;;;;;;;;;;;;;;9175:9:::1;::::0;9168:42:::1;::::0;-1:-1:-1;;;;;9175:9:0::1;9199:2:::0;9203:6;9168:42:::1;:30;:42;:::i;:::-;9094:124:::0;;:::o;1156:230::-;1224:11;;-1:-1:-1;;;;;1224:11:0;1210:10;:25;1202:51;;;;-1:-1:-1;;;1202:51:0;;;;;;;;;1299:11;;;1290:7;;1269:42;;-1:-1:-1;;;;;1299:11:0;;;;1290:7;;;;1269:42;;;1332:11;;;;1322:21;;-1:-1:-1;;;;;;1322:21:0;;;-1:-1:-1;;;;;1332:11:0;;1322:21;;;;1354:24;;;1156:230::o;8973:24::-;;;-1:-1:-1;;;;;8973:24:0;;:::o;335:26::-;;;-1:-1:-1;;;;;335:26:0;;:::o;924:224::-;702:7;;-1:-1:-1;;;;;702:7:0;688:10;:21;680:43;;;;-1:-1:-1;;;680:43:0;;;;;;;;;-1:-1:-1;;;;;1007:22:0;::::1;999:48;;;;-1:-1:-1::0;;;999:48:0::1;;;;;;;;;1089:7;::::0;;1063:44:::1;::::0;-1:-1:-1;;;;;1063:44:0;;::::1;::::0;1089:7;::::1;::::0;1063:44:::1;::::0;::::1;1118:11;:22:::0;;-1:-1:-1;;;;;;1118:22:0::1;-1:-1:-1::0;;;;;1118:22:0;;;::::1;::::0;;;::::1;::::0;;924:224::o;6071:211::-;6188:86;6208:5;6238:23;;;6263:2;6267:5;6215:58;;;;;;;;;;;;;;-1:-1:-1;;6215:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;6215:58:0;-1:-1:-1;;;;;;6215:58:0;;;;;;;;;;6188:19;:86::i;:::-;6071:211;;;:::o;7644:1046::-;8304:12;8318:23;8353:5;-1:-1:-1;;;;;8345:19:0;8365:4;8345:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8303:67;;;;8389:7;8381:52;;;;-1:-1:-1;;;8381:52:0;;;;;;;;;8450:17;;:21;8446:237;;8605:10;8594:30;;;;;;;;;;;;;;8586:85;;;;-1:-1:-1;;;8586:85:0;;;;;;;;;7644:1046;;;;:::o;5:130:-1:-;72:20;;-1:-1;;;;;7259:54;;7740:35;;7730:2;;7789:1;;7779:12;7730:2;57:78;;;;;414:241;;518:2;506:9;497:7;493:23;489:32;486:2;;;-1:-1;;524:12;486:2;586:53;631:7;607:22;586:53;;;576:63;480:175;-1:-1;;;480:175;662:366;;;783:2;771:9;762:7;758:23;754:32;751:2;;;-1:-1;;789:12;751:2;851:53;896:7;872:22;851:53;;;841:63;941:2;980:22;;;;344:20;;-1:-1;;;745:283;1035:257;;1147:2;1135:9;1126:7;1122:23;1118:32;1115:2;;;-1:-1;;1153:12;1115:2;223:6;217:13;7886:5;7171:13;7164:21;7864:5;7861:32;7851:2;;-1:-1;;7897:12;3592:271;;1579:5;6641:12;-1:-1;7477:101;7491:6;7488:1;7485:13;7477:101;;;1723:4;7558:11;;;;;7552:18;7539:11;;;7532:39;7506:10;7477:101;;;7593:6;7590:1;7587:13;7584:2;;;-1:-1;7649:6;7644:3;7640:16;7633:27;7584:2;-1:-1;1754:16;;;;;3726:137;-1:-1;;3726:137;3870:222;-1:-1;;;;;7259:54;;;;1370:37;;3997:2;3982:18;;3968:124;4099:333;-1:-1;;;;;7259:54;;;;1370:37;;4418:2;4403:18;;3543:37;4254:2;4239:18;;4225:207;4439:416;4639:2;4653:47;;;2007:2;4624:18;;;6939:19;-1:-1;;;6979:14;;;2023:36;2078:12;;;4610:245;4862:416;5062:2;5076:47;;;5047:18;;;6939:19;2365:34;6979:14;;;2345:55;2419:12;;;5033:245;5285:416;5485:2;5499:47;;;2670:2;5470:18;;;6939:19;-1:-1;;;6979:14;;;2686:36;2741:12;;;5456:245;5708:416;5908:2;5922:47;;;2992:1;5893:18;;;6939:19;-1:-1;;;6979:14;;;3007:32;3058:12;;;5879:245;6131:416;6331:2;6345:47;;;3309:2;6316:18;;;6939:19;3345:34;6979:14;;;3325:55;-1:-1;;;3400:12;;;3393:34;3446:12;;;6302:245
Swarm Source
ipfs://ef58be852af0c74d1fffbe345875ca42a7e339c35b79546168f52cb1dc23fe57
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.209785 | 12,860,171.6646 | $2,697,871.11 |
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.