Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 28 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 21301591 | 4 days ago | IN | 0 ETH | 0.00281678 | ||||
Claim | 21283870 | 7 days ago | IN | 0 ETH | 0.001466 | ||||
Claim | 21261644 | 10 days ago | IN | 0 ETH | 0.00145732 | ||||
Claim | 21129202 | 28 days ago | IN | 0 ETH | 0.00346986 | ||||
Claim | 21107099 | 32 days ago | IN | 0 ETH | 0.00081389 | ||||
Claim | 20296470 | 145 days ago | IN | 0 ETH | 0.00034202 | ||||
Claim | 20296250 | 145 days ago | IN | 0 ETH | 0.00032614 | ||||
Claim | 19883059 | 202 days ago | IN | 0 ETH | 0.00123426 | ||||
Claim | 19582417 | 245 days ago | IN | 0 ETH | 0.00473773 | ||||
Claim | 19050330 | 319 days ago | IN | 0 ETH | 0.00328383 | ||||
Claim | 19000788 | 326 days ago | IN | 0 ETH | 0.00371652 | ||||
Claim | 18982962 | 329 days ago | IN | 0 ETH | 0.00462014 | ||||
Claim | 18824335 | 351 days ago | IN | 0 ETH | 0.00661555 | ||||
Claim | 18742619 | 362 days ago | IN | 0 ETH | 0.00864756 | ||||
Claim | 18697571 | 369 days ago | IN | 0 ETH | 0.00654786 | ||||
Claim | 18682473 | 371 days ago | IN | 0 ETH | 0.00711781 | ||||
Claim | 18609787 | 381 days ago | IN | 0 ETH | 0.00379675 | ||||
Claim | 18491733 | 398 days ago | IN | 0 ETH | 0.00488055 | ||||
Claim | 18222702 | 435 days ago | IN | 0 ETH | 0.00280059 | ||||
Claim | 18153580 | 445 days ago | IN | 0 ETH | 0.00147363 | ||||
Claim | 18153565 | 445 days ago | IN | 0 ETH | 0.0014462 | ||||
Claim | 17633911 | 518 days ago | IN | 0 ETH | 0.00728466 | ||||
Claim | 17633788 | 518 days ago | IN | 0 ETH | 0.00902 | ||||
Claim | 17633787 | 518 days ago | IN | 0 ETH | 0.00892798 | ||||
Claim | 17482895 | 539 days ago | IN | 0 ETH | 0.00323212 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TreasuryVester
Compiler Version
v0.7.5+commit.eb77ed08
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// Contracts by dYdX Foundation. Individual files are released under different licenses. // // https://dydx.community // https://github.com/dydxfoundation/governance-contracts // // SPDX-License-Identifier: MIT pragma solidity 0.7.5; import { SafeMath } from '../dependencies/open-zeppelin/SafeMath.sol'; contract TreasuryVester { using SafeMath for uint256; address public dydx; address public recipient; uint256 public vestingAmount; uint256 public vestingBegin; uint256 public vestingCliff; uint256 public vestingEnd; uint256 public lastUpdate; constructor( address dydx_, address recipient_, uint256 vestingAmount_, uint256 vestingBegin_, uint256 vestingCliff_, uint256 vestingEnd_ ) { require(vestingBegin_ >= block.timestamp, 'VESTING_BEGIN_TOO_EARLY'); require(vestingCliff_ >= vestingBegin_, 'VESTING_CLIFF_BEFORE_BEGIN'); require(vestingEnd_ > vestingCliff_, 'VESTING_END_BEFORE_CLIFF'); dydx = dydx_; recipient = recipient_; vestingAmount = vestingAmount_; vestingBegin = vestingBegin_; vestingCliff = vestingCliff_; vestingEnd = vestingEnd_; lastUpdate = vestingBegin; } function setRecipient(address recipient_) public { require(msg.sender == recipient, 'SET_RECIPIENT_UNAUTHORIZED'); recipient = recipient_; } function claim() public { require(block.timestamp >= vestingCliff, 'CLAIM_TOO_EARLY'); uint256 amount; if (block.timestamp >= vestingEnd) { amount = IDydx(dydx).balanceOf(address(this)); } else { amount = vestingAmount.mul(block.timestamp - lastUpdate).div(vestingEnd - vestingBegin); lastUpdate = block.timestamp; } IDydx(dydx).transfer(recipient, amount); } } interface IDydx { function balanceOf(address account) external view returns (uint256); function transfer(address dst, uint256 rawAmount) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.7.5; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, 'SafeMath: addition overflow'); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, 'SafeMath: subtraction overflow'); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, 'SafeMath: multiplication overflow'); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, 'SafeMath: division by zero'); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, 'SafeMath: modulo by zero'); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"dydx_","type":"address"},{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"vestingAmount_","type":"uint256"},{"internalType":"uint256","name":"vestingBegin_","type":"uint256"},{"internalType":"uint256","name":"vestingCliff_","type":"uint256"},{"internalType":"uint256","name":"vestingEnd_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dydx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"}],"name":"setRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vestingAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingBegin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingCliff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516106bb3803806106bb833981810160405260c081101561003357600080fd5b508051602082015160408301516060840151608085015160a0909501519394929391929091428310156100ad576040805162461bcd60e51b815260206004820152601760248201527f56455354494e475f424547494e5f544f4f5f4541524c59000000000000000000604482015290519081900360640190fd5b82821015610102576040805162461bcd60e51b815260206004820152601a60248201527f56455354494e475f434c4946465f4245464f52455f424547494e000000000000604482015290519081900360640190fd5b818111610156576040805162461bcd60e51b815260206004820152601860248201527f56455354494e475f454e445f4245464f52455f434c4946460000000000000000604482015290519081900360640190fd5b600080546001600160a01b039788166001600160a01b0319918216179091556001805496909716951694909417909455600291909155600381905560049290925560055560065561050f806101ac6000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c806384a1931f1161006657806384a1931f146101055780638e4ec6ef1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f76146100975780633bbed4a0146100b15780634e71d92d146100d957806366d003ac146100e1575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100d7600480360360208110156100c757600080fd5b50356001600160a01b0316610133565b005b6100d76101b4565b6100e9610341565b604080516001600160a01b039092168252519081900360200190f35b61009f610350565b6100e9610356565b61009f610365565b61009f61036b565b61009f610371565b60025481565b6001546001600160a01b03163314610192576040805162461bcd60e51b815260206004820152601a60248201527f5345545f524543495049454e545f554e415554484f52495a4544000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101fd576040805162461bcd60e51b815260206004820152600f60248201526e434c41494d5f544f4f5f4541524c5960881b604482015290519081900360640190fd5b6000600554421061028657600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561025357600080fd5b505afa158015610267573d6000803e3d6000fd5b505050506040513d602081101561027d57600080fd5b505190506102b6565b6102af600354600554036102a9600654420360025461037790919063ffffffff16565b906103d9565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561031257600080fd5b505af1158015610326573d6000803e3d6000fd5b505050506040513d602081101561033c57600080fd5b505050565b6001546001600160a01b031681565b60055481565b6000546001600160a01b031681565b60065481565b60035481565b60045481565b600082610386575060006103d3565b8282028284828161039357fe5b04146103d05760405162461bcd60e51b81526004018080602001828103825260218152602001806104b96021913960400191505060405180910390fd5b90505b92915050565b60006103d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836104a25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561046757818101518382015260200161044f565b50505050905090810190601f1680156104945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104ae57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122087e79d51395641be17d761c90925a7346a52d71967348f6b0dafb4de6684219264736f6c6343000705003300000000000000000000000092d6c1e31e14520e676a687f0a93788b716beff5000000000000000000000000639192d54431f8c816368d3fb4107bc168d0e87100000000000000000000000000000000000000000131c039e0a8cd9b8344000000000000000000000000000000000000000000000000000000000000610959f000000000000000000000000000000000000000000000000000000000610959f0000000000000000000000000000000000000000000000000000000006a70acf0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100925760003560e01c806384a1931f1161006657806384a1931f146101055780638e4ec6ef1461010d578063c046371114610115578063e29bc68b1461011d578063f3640e741461012557610092565b8062728f76146100975780633bbed4a0146100b15780634e71d92d146100d957806366d003ac146100e1575b600080fd5b61009f61012d565b60408051918252519081900360200190f35b6100d7600480360360208110156100c757600080fd5b50356001600160a01b0316610133565b005b6100d76101b4565b6100e9610341565b604080516001600160a01b039092168252519081900360200190f35b61009f610350565b6100e9610356565b61009f610365565b61009f61036b565b61009f610371565b60025481565b6001546001600160a01b03163314610192576040805162461bcd60e51b815260206004820152601a60248201527f5345545f524543495049454e545f554e415554484f52495a4544000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004544210156101fd576040805162461bcd60e51b815260206004820152600f60248201526e434c41494d5f544f4f5f4541524c5960881b604482015290519081900360640190fd5b6000600554421061028657600054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561025357600080fd5b505afa158015610267573d6000803e3d6000fd5b505050506040513d602081101561027d57600080fd5b505190506102b6565b6102af600354600554036102a9600654420360025461037790919063ffffffff16565b906103d9565b4260065590505b600080546001546040805163a9059cbb60e01b81526001600160a01b039283166004820152602481018690529051919092169263a9059cbb92604480820193602093909283900390910190829087803b15801561031257600080fd5b505af1158015610326573d6000803e3d6000fd5b505050506040513d602081101561033c57600080fd5b505050565b6001546001600160a01b031681565b60055481565b6000546001600160a01b031681565b60065481565b60035481565b60045481565b600082610386575060006103d3565b8282028284828161039357fe5b04146103d05760405162461bcd60e51b81526004018080602001828103825260218152602001806104b96021913960400191505060405180910390fd5b90505b92915050565b60006103d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836104a25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561046757818101518382015260200161044f565b50505050905090810190601f1680156104945780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104ae57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122087e79d51395641be17d761c90925a7346a52d71967348f6b0dafb4de6684219264736f6c63430007050033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000092d6c1e31e14520e676a687f0a93788b716beff5000000000000000000000000639192d54431f8c816368d3fb4107bc168d0e87100000000000000000000000000000000000000000131c039e0a8cd9b8344000000000000000000000000000000000000000000000000000000000000610959f000000000000000000000000000000000000000000000000000000000610959f0000000000000000000000000000000000000000000000000000000006a70acf0
-----Decoded View---------------
Arg [0] : dydx_ (address): 0x92D6C1e31e14520e676a687F0a93788B716BEff5
Arg [1] : recipient_ (address): 0x639192D54431F8c816368D3FB4107Bc168d0E871
Arg [2] : vestingAmount_ (uint256): 369630137000000000000000000
Arg [3] : vestingBegin_ (uint256): 1628002800
Arg [4] : vestingCliff_ (uint256): 1628002800
Arg [5] : vestingEnd_ (uint256): 1785769200
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000092d6c1e31e14520e676a687f0a93788b716beff5
Arg [1] : 000000000000000000000000639192d54431f8c816368d3fb4107bc168d0e871
Arg [2] : 00000000000000000000000000000000000000000131c039e0a8cd9b83440000
Arg [3] : 00000000000000000000000000000000000000000000000000000000610959f0
Arg [4] : 00000000000000000000000000000000000000000000000000000000610959f0
Arg [5] : 000000000000000000000000000000000000000000000000000000006a70acf0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1.86 | 123,672,647.9757 | $230,031,125.23 |
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.