More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 86 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 21624843 | 38 days ago | IN | 0 ETH | 0.00067037 | ||||
Change Destinati... | 15230493 | 940 days ago | IN | 0 ETH | 0.00013755 | ||||
Withdraw | 13958383 | 1141 days ago | IN | 0 ETH | 0.00745394 | ||||
Withdraw | 13685401 | 1184 days ago | IN | 0 ETH | 0.00674553 | ||||
Withdraw | 13393133 | 1230 days ago | IN | 0 ETH | 0.00487372 | ||||
Withdraw | 12838090 | 1316 days ago | IN | 0 ETH | 0.00343225 | ||||
Withdraw | 12623384 | 1350 days ago | IN | 0 ETH | 0.00014283 | ||||
Withdraw | 12523389 | 1365 days ago | IN | 0 ETH | 0.00083321 | ||||
Withdraw | 12523388 | 1365 days ago | IN | 0 ETH | 0.00302038 | ||||
Withdraw | 12427567 | 1380 days ago | IN | 0 ETH | 0.01469003 | ||||
Withdraw | 12337890 | 1394 days ago | IN | 0 ETH | 0.00377547 | ||||
Withdraw | 12336193 | 1394 days ago | IN | 0 ETH | 0.00734501 | ||||
Withdraw | 12336191 | 1394 days ago | IN | 0 ETH | 0.00734501 | ||||
Withdraw | 12325054 | 1396 days ago | IN | 0 ETH | 0.00384412 | ||||
Withdraw | 12311522 | 1398 days ago | IN | 0 ETH | 0.0033636 | ||||
Withdraw | 12282627 | 1403 days ago | IN | 0 ETH | 0.00954165 | ||||
Withdraw | 12276735 | 1403 days ago | IN | 0 ETH | 0.01352306 | ||||
Withdraw | 12276592 | 1404 days ago | IN | 0 ETH | 0.013729 | ||||
Withdraw | 12276314 | 1404 days ago | IN | 0 ETH | 0.013729 | ||||
Withdraw | 12276058 | 1404 days ago | IN | 0 ETH | 0.02004434 | ||||
Withdraw | 12266837 | 1405 days ago | IN | 0 ETH | 0.00638398 | ||||
Withdraw | 12243473 | 1409 days ago | IN | 0 ETH | 0.005344 | ||||
Withdraw | 12237605 | 1410 days ago | IN | 0 ETH | 0.00546409 | ||||
Withdraw | 12234670 | 1410 days ago | IN | 0 ETH | 0.00198052 | ||||
Withdraw | 12234670 | 1410 days ago | IN | 0 ETH | 0.00504378 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x1D851A20...4DB4Ee401 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
UniformTimeVault
Compiler Version
v0.7.4+commit.3f05b770
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-03-30 */ // SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.7.4; library SafeMathLib { function times(uint a, uint b) public pure returns (uint) { uint c = a * b; require(a == 0 || c / a == b, 'Overflow detected'); return c; } function minus(uint a, uint b) public pure returns (uint) { require(b <= a, 'Underflow detected'); return a - b; } function plus(uint a, uint b) public pure returns (uint) { uint c = a + b; require(c>=a && c>=b, 'Overflow detected'); return c; } } /** * @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); } contract UniformTimeVault { using SafeMathLib for uint; IERC20 public token; uint public numTranches = 0; uint public startTime = 0; uint public endTime = 0; uint public vestingPeriodLength = 0; uint public totalAllocation = 0; struct Tranche { uint id; address destination; uint totalCoins; uint currentCoins; uint coinsPerSecond; uint lastWithdrawalTime; } mapping (uint => Tranche) public tranches; event WithdrawalOccurred(uint trancheId, uint numTokens, uint tokensLeft); event TrancheAdded(uint id, address destination, uint totalCoins); constructor(address tokenAddr, address[] memory destinations, uint[] memory tokenAllocations, uint _endTime, uint _startTime) { token = IERC20(tokenAddr); endTime = _endTime; startTime = _startTime; vestingPeriodLength = endTime - startTime; require(vestingPeriodLength > 0 , 'start time must be before end time'); for (uint i = 0; i < destinations.length; i++) { uint trancheId = i + 1; uint coinsPerSecond = tokenAllocations[i] / vestingPeriodLength; totalAllocation = totalAllocation.plus(tokenAllocations[i]); tranches[trancheId] = Tranche( trancheId, destinations[i], tokenAllocations[i], tokenAllocations[i], coinsPerSecond, _startTime ); emit TrancheAdded(trancheId, destinations[i], tokenAllocations[i]); } numTranches = destinations.length; } function withdraw(uint trancheId) external { Tranche storage tranche = tranches[trancheId]; require(tranche.currentCoins > 0, 'No coins left to withdraw'); uint currentWithdrawal = 0; // if after vesting period ends, give them the remaining coins if (block.timestamp >= endTime) { currentWithdrawal = tranche.currentCoins; } else { // compute allowed withdrawal currentWithdrawal = (block.timestamp.minus(tranche.lastWithdrawalTime)).times(tranche.coinsPerSecond); } // update struct tranche.currentCoins = tranche.currentCoins.minus(currentWithdrawal); tranche.lastWithdrawalTime = block.timestamp; // transfer the tokens, brah token.transfer(tranche.destination, currentWithdrawal); emit WithdrawalOccurred(trancheId, currentWithdrawal, tranche.currentCoins); } function changeDestination(uint trancheId, address newDestination) external { Tranche storage tranche = tranches[trancheId]; require(tranche.destination == msg.sender, 'Can only change destination if you are the destination'); tranche.destination = newDestination; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"address[]","name":"destinations","type":"address[]"},{"internalType":"uint256[]","name":"tokenAllocations","type":"uint256[]"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalCoins","type":"uint256"}],"name":"TrancheAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"trancheId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensLeft","type":"uint256"}],"name":"WithdrawalOccurred","type":"event"},{"inputs":[{"internalType":"uint256","name":"trancheId","type":"uint256"},{"internalType":"address","name":"newDestination","type":"address"}],"name":"changeDestination","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numTranches","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tranches","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"totalCoins","type":"uint256"},{"internalType":"uint256","name":"currentCoins","type":"uint256"},{"internalType":"uint256","name":"coinsPerSecond","type":"uint256"},{"internalType":"uint256","name":"lastWithdrawalTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingPeriodLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"trancheId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c806378e979251161006657806378e979251461017d57806379203dc41461019b578063b3a56077146101b9578063db8e8e9b146101d7578063fc0c546a1461022557610093565b80631c7afe941461009857806326c25962146100b65780632e1a7d4d146101315780633197cbb61461015f575b600080fd5b6100a0610259565b6040518082815260200191505060405180910390f35b6100e2600480360360208110156100cc57600080fd5b810190808035906020019092919050505061025f565b604051808781526020018673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b61015d6004803603602081101561014757600080fd5b81019080803590602001909291905050506102bb565b005b61016761067f565b6040518082815260200191505060405180910390f35b610185610685565b6040518082815260200191505060405180910390f35b6101a361068b565b6040518082815260200191505060405180910390f35b6101c1610691565b6040518082815260200191505060405180910390f35b610223600480360360408110156101ed57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610697565b005b61022d61079e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60015481565b60066020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040154908060050154905086565b6000600660008381526020019081526020016000209050600081600301541161034c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4e6f20636f696e73206c65667420746f2077697468647261770000000000000081525060200191505060405180910390fd5b600060035442106103635781600301549050610495565b427382d7630c5eb722557de6d76575c9a7b8de71850063f4f3bdc1909184600501546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156103c057600080fd5b505af41580156103d4573d6000803e3d6000fd5b505050506040513d60208110156103ea57600080fd5b81019080805190602001909291905050507382d7630c5eb722557de6d76575c9a7b8de718500631d3b9edf909184600401546040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561045757600080fd5b505af415801561046b573d6000803e3d6000fd5b505050506040513d602081101561048157600080fd5b810190808051906020019092919050505090505b81600301547382d7630c5eb722557de6d76575c9a7b8de71850063f4f3bdc19091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b1580156104f257600080fd5b505af4158015610506573d6000803e3d6000fd5b505050506040513d602081101561051c57600080fd5b8101908080519060200190929190505050826003018190555042826005018190555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b505050506040513d602081101561061d57600080fd5b8101908080519060200190929190505050507f9c444ca536e256f46459550ce8cc4ff4c578fd67037ddb7bf99e79e1288b692f8382846003015460405180848152602001838152602001828152602001935050505060405180910390a1505050565b60035481565b60025481565b60055481565b60045481565b60006006600084815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610756576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806107c36036913960400191505060405180910390fd5b818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe43616e206f6e6c79206368616e67652064657374696e6174696f6e20696620796f7520617265207468652064657374696e6174696f6ea2646970667358221220cd836f2485640fc7fa2ed417fa9f076e6968a9c0f44bbcfde34f5a6feba6da6164736f6c63430007040033
Deployed Bytecode Sourcemap
3263:2932:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3357:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3732:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4955:931;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3423:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3391:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3495:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3453:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5894:298;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3331:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3357:27;;;;:::o;3732:41::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4955:931::-;5009:23;5035:8;:19;5044:9;5035:19;;;;;;;;;;;5009:45;;5097:1;5073:7;:20;;;:25;5065:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5139:22;5273:7;;5254:15;:26;5250:276;;5317:7;:20;;;5297:40;;5250:276;;;5434:15;:21;;;;5456:7;:26;;;5434:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5433:57;;;;5491:7;:22;;;5433:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5413:101;;5250:276;5587:7;:20;;;:26;;;;5614:17;5587:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5564:7;:20;;:68;;;;5672:15;5643:7;:26;;:44;;;;5738:5;;;;;;;;;;:14;;;5753:7;:19;;;;;;;;;;;;5774:17;5738:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5808:70;5827:9;5838:17;5857:7;:20;;;5808:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4955:931;;;:::o;3423:23::-;;;;:::o;3391:25::-;;;;:::o;3495:31::-;;;;:::o;3453:35::-;;;;:::o;5894:298::-;5981:23;6007:8;:19;6016:9;6007:19;;;;;;;;;;;5981:45;;6068:10;6045:33;;:7;:19;;;;;;;;;;;;:33;;;6037:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6170:14;6148:7;:19;;;:36;;;;;;;;;;;;;;;;;;5894:298;;;:::o;3331:19::-;;;;;;;;;;;;:::o
Swarm Source
ipfs://cd836f2485640fc7fa2ed417fa9f076e6968a9c0f44bbcfde34f5a6feba6da61
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.000205 | 4,297,159 | $879.07 |
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.