Source Code
Latest 25 from a total of 203 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Unlock | 13855431 | 1546 days ago | IN | 0 ETH | 0.0032217 | ||||
| Unlock | 11060095 | 1980 days ago | IN | 0 ETH | 0.00206394 | ||||
| Unlock | 10813892 | 2018 days ago | IN | 0 ETH | 0.00262088 | ||||
| Unlock | 10813869 | 2018 days ago | IN | 0 ETH | 0.00288296 | ||||
| Unlock | 10813869 | 2018 days ago | IN | 0 ETH | 0.00288296 | ||||
| Unlock | 10813869 | 2018 days ago | IN | 0 ETH | 0.00262088 | ||||
| Unlock | 10813847 | 2018 days ago | IN | 0 ETH | 0.00262088 | ||||
| Unlock | 10813826 | 2018 days ago | IN | 0 ETH | 0.00278468 | ||||
| Unlock | 10813814 | 2018 days ago | IN | 0 ETH | 0.0028502 | ||||
| Unlock | 10795687 | 2020 days ago | IN | 0 ETH | 0.01179647 | ||||
| Unlock | 10795657 | 2020 days ago | IN | 0 ETH | 0.00966449 | ||||
| Lock | 8529401 | 2379 days ago | IN | 0 ETH | 0.00134652 | ||||
| Lock | 8529399 | 2379 days ago | IN | 0 ETH | 0.00132177 | ||||
| Unlock | 8290659 | 2417 days ago | IN | 0 ETH | 0.00003019 | ||||
| Unlock | 8290640 | 2417 days ago | IN | 0 ETH | 0.00009057 | ||||
| Unlock | 8290631 | 2417 days ago | IN | 0 ETH | 0.00011307 | ||||
| Unlock | 8290614 | 2417 days ago | IN | 0 ETH | 0.00009057 | ||||
| Unlock | 8290606 | 2417 days ago | IN | 0 ETH | 0.00011307 | ||||
| Unlock | 8290599 | 2417 days ago | IN | 0 ETH | 0.00011307 | ||||
| Unlock | 8290545 | 2417 days ago | IN | 0 ETH | 0.00003019 | ||||
| Unlock | 8290527 | 2417 days ago | IN | 0 ETH | 0.00007538 | ||||
| Unlock | 8290517 | 2417 days ago | IN | 0 ETH | 0.00011307 | ||||
| Unlock | 8290516 | 2417 days ago | IN | 0 ETH | 0.00003019 | ||||
| Lock | 7777730 | 2497 days ago | IN | 0 ETH | 0.0009012 | ||||
| Unlock | 7211597 | 2590 days ago | IN | 0 ETH | 0.00009057 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
TokenTimeLock
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-01-15
*/
pragma solidity ^0.4.19;
/**
* EIP-20 standard token interface, as defined at
* ttps://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
*/
contract Token {
function name() public constant returns (string);
function symbol() public constant returns (string);
function decimals() public constant returns (uint8);
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
function allowance(address _owner, address _spender)
public constant returns (uint256);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(
address indexed _owner, address indexed _spender, uint256 _value);
}
/**
* Allows one to lock EIP-20 tokens until certain time arrives.
* Copyright © 2018 by ABDK Consulting https://abdk.consulting/
* Author: Mikhail Vladimirov <mikhail.vladimirov[at]gmail.com>
*/
contract TokenTimeLock {
/**
* Create new Token Time Lock with given donation address.
*
* @param _donationAddress donation address
*/
function TokenTimeLock (address _donationAddress) public {
donationAddress = _donationAddress;
}
/**
* Lock given amount of given EIP-20 tokens until given time arrives, after
* this time allow the tokens to be transferred to given beneficiary. This
* contract should be allowed to transfer at least given amount of tokens
* from msg.sender.
*
* @param _token EIP-20 token contract managing tokens to be locked
* @param _beneficiary beneficiary to receive tokens after unlock time
* @param _amount amount of tokens to be locked
* @param _unlockTime unlock time
*
* @return time lock ID
*/
function lock (
Token _token, address _beneficiary, uint256 _amount,
uint256 _unlockTime) public returns (uint256) {
require (_amount > 0);
uint256 id = nextLockID++;
TokenTimeLockInfo storage lockInfo = locks [id];
lockInfo.token = _token;
lockInfo.beneficiary = _beneficiary;
lockInfo.amount = _amount;
lockInfo.unlockTime = _unlockTime;
Lock (id, _token, _beneficiary, _amount, _unlockTime);
require (_token.transferFrom (msg.sender, this, _amount));
return id;
}
/**
* Unlock tokens locked under time lock with given ID and transfer them to
* corresponding beneficiary.
*
* @param _id time lock ID to unlock tokens locked under
*/
function unlock (uint256 _id) public {
TokenTimeLockInfo memory lockInfo = locks [_id];
delete locks [_id];
require (lockInfo.amount > 0);
require (lockInfo.unlockTime <= block.timestamp);
Unlock (_id);
require (
lockInfo.token.transfer (
lockInfo.beneficiary, lockInfo.amount));
}
/**
* If you like this contract, you may send some ether to this address and
* it will be used to develop more useful contracts available to everyone.
*/
address public donationAddress;
/**
* Next time lock ID to be used.
*/
uint256 private nextLockID = 0;
/**
* Maps time lock ID to TokenTimeLockInfo structure encapsulating time lock
* information.
*/
mapping (uint256 => TokenTimeLockInfo) public locks;
/**
* Encapsulates information abount time lock.
*/
struct TokenTimeLockInfo {
/**
* EIP-20 token contract managing locked tokens.
*/
Token token;
/**
* Beneficiary to receive tokens once they are unlocked.
*/
address beneficiary;
/**
* Amount of locked tokens.
*/
uint256 amount;
/**
* Unlock time.
*/
uint256 unlockTime;
}
/**
* Logged when tokens were time locked.
*
* @param id time lock ID
* @param token EIP-20 token contract managing locked tokens
* @param beneficiary beneficiary to receive tokens once they are unlocked
* @param amount amount of locked tokens
* @param unlockTime unlock time
*/
event Lock (
uint256 indexed id, Token indexed token, address indexed beneficiary,
uint256 amount, uint256 unlockTime);
/**
* Logged when tokens were unlocked and sent to beneficiary.
*
* @param id time lock ID
*/
event Unlock (uint256 indexed id);
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_beneficiary","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_unlockTime","type":"uint256"}],"name":"lock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"uint256"}],"name":"unlock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"donationAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"locks","outputs":[{"name":"token","type":"address"},{"name":"beneficiary","type":"address"},{"name":"amount","type":"uint256"},{"name":"unlockTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_donationAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"},{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"unlockTime","type":"uint256"}],"name":"Lock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"uint256"}],"name":"Unlock","type":"event"}]Contract Creation Code
60606040526000600155341561001457600080fd5b6040516020806104d48339810160405280805160008054600160a060020a03909216600160a060020a0319909216919091179055505061047b806100596000396000f3006060604052600436106100485763ffffffff60e060020a6000350416634b86c225811461004d5780636198e3391461008a578063ec034bed146100a2578063f4dadc61146100d1575b600080fd5b341561005857600080fd5b610078600160a060020a036004358116906024351660443560643561011c565b60405190815260200160405180910390f35b341561009557600080fd5b6100a060043561026c565b005b34156100ad57600080fd5b6100b56103e3565b604051600160a060020a03909116815260200160405180910390f35b34156100dc57600080fd5b6100e76004356103f2565b604051600160a060020a0394851681529290931660208301526040808301919091526060820192909252608001905180910390f35b6000808080851161012c57600080fd5b50506001805480820182556000818152600260208190526040918290208054600160a060020a03808c1673ffffffffffffffffffffffffffffffffffffffff19928316811784559683018054918c16919092168117909155918101889055600381018790559293909184907fbf35d96b29ba4a2628464e8ad987a688a035b265aac3ba73c6bf79ccd8b9863490899089905191825260208201526040908101905180910390a486600160a060020a03166323b872dd33308860006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561023c57600080fd5b6102c65a03f1151561024d57600080fd5b50505060405180519050151561026257600080fd5b5095945050505050565b610274610428565b60008281526002602052604090819020906080905190810160409081528254600160a060020a0390811683526001808501549091166020808501919091526002808601548486019081526003968701546060870152600089815292829052938220805473ffffffffffffffffffffffffffffffffffffffff199081168255938101805490941690935582018190559301839055909250511161031557600080fd5b428160600151111561032657600080fd5b817f832a253ad4e9e88f705006a24d9957b8aa1de307a0f9d0a6ad5fd0b0ac81050560405160405180910390a28051600160a060020a031663a9059cbb8260200151836040015160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156103b957600080fd5b6102c65a03f115156103ca57600080fd5b5050506040518051905015156103df57600080fd5b5050565b600054600160a060020a031681565b60026020819052600091825260409091208054600182015492820154600390920154600160a060020a0391821693909116919084565b608060405190810160409081526000808352602083018190529082018190526060820152905600a165627a7a72305820921104e4ac6e14e170b92914e15e098053f35444d20d122f6cb51fa4c6729af70029000000000000000000000000f12dd9bf0631d33ec71c40787a928a22c797af12
Deployed Bytecode
0x6060604052600436106100485763ffffffff60e060020a6000350416634b86c225811461004d5780636198e3391461008a578063ec034bed146100a2578063f4dadc61146100d1575b600080fd5b341561005857600080fd5b610078600160a060020a036004358116906024351660443560643561011c565b60405190815260200160405180910390f35b341561009557600080fd5b6100a060043561026c565b005b34156100ad57600080fd5b6100b56103e3565b604051600160a060020a03909116815260200160405180910390f35b34156100dc57600080fd5b6100e76004356103f2565b604051600160a060020a0394851681529290931660208301526040808301919091526060820192909252608001905180910390f35b6000808080851161012c57600080fd5b50506001805480820182556000818152600260208190526040918290208054600160a060020a03808c1673ffffffffffffffffffffffffffffffffffffffff19928316811784559683018054918c16919092168117909155918101889055600381018790559293909184907fbf35d96b29ba4a2628464e8ad987a688a035b265aac3ba73c6bf79ccd8b9863490899089905191825260208201526040908101905180910390a486600160a060020a03166323b872dd33308860006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561023c57600080fd5b6102c65a03f1151561024d57600080fd5b50505060405180519050151561026257600080fd5b5095945050505050565b610274610428565b60008281526002602052604090819020906080905190810160409081528254600160a060020a0390811683526001808501549091166020808501919091526002808601548486019081526003968701546060870152600089815292829052938220805473ffffffffffffffffffffffffffffffffffffffff199081168255938101805490941690935582018190559301839055909250511161031557600080fd5b428160600151111561032657600080fd5b817f832a253ad4e9e88f705006a24d9957b8aa1de307a0f9d0a6ad5fd0b0ac81050560405160405180910390a28051600160a060020a031663a9059cbb8260200151836040015160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156103b957600080fd5b6102c65a03f115156103ca57600080fd5b5050506040518051905015156103df57600080fd5b5050565b600054600160a060020a031681565b60026020819052600091825260409091208054600182015492820154600390920154600160a060020a0391821693909116919084565b608060405190810160409081526000808352602083018190529082018190526060820152905600a165627a7a72305820921104e4ac6e14e170b92914e15e098053f35444d20d122f6cb51fa4c6729af70029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f12dd9bf0631d33ec71c40787a928a22c797af12
-----Decoded View---------------
Arg [0] : _donationAddress (address): 0xf12DD9Bf0631D33Ec71c40787a928A22c797AF12
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f12dd9bf0631d33ec71c40787a928a22c797af12
Swarm Source
bzzr://921104e4ac6e14e170b92914e15e098053f35444d20d122f6cb51fa4c6729af7
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.