A time-locked ether deposit: the sender locks ether until a chosen timestamp and can withdraw it once that time has passed.
Key Facts
Description
lockUntil(timestamp) adds the ether sent to the sender's deposit for that timestamp and emits Locked; a timestamp in the past is refunded. withdrawAtTimestamp(timestamp) pays the deposit out once the time has passed and emits Withdrew, which logs the balance after it has been cleared, so the logged amount is always zero.
Source Verified
Exact runtime and creation bytecode match with soljson v0.1.5+commit.23865e39, optimizer off. Source: handwritten reconstruction from bytecode; events Locked/Withdrew resolved from their topic hashes, withdrawAtTimestamp(uint256) recovered by dictionary search. Verified on Etherscan. Not submitted to Sourcify: its oldest supported compiler is v0.1.7. Contract name is a stand-in: stand-in: the original contract name is not recoverable from the bytecode; TimeLock describes what it does.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract TimeLock {
mapping (address => mapping (uint => uint)) deposits;
event Locked(address indexed owner, uint until, uint value);
event Withdrew(address indexed owner, uint until, uint value);
function lockUntil(uint until) returns (bool) {
if (until > now) {
deposits[msg.sender][until] += msg.value;
Locked(msg.sender, until, msg.value);
return true;
} else {
msg.sender.send(msg.value);
return false;
}
}
function withdrawAtTimestamp(uint until) returns (bool) {
if (now >= until && deposits[msg.sender][until] > 0) {
msg.sender.send(deposits[msg.sender][until]);
deposits[msg.sender][until] = 0;
Withdrew(msg.sender, until, deposits[msg.sender][until]);
return true;
} else {
return false;
}
}
}External Links
Related contracts
Standard_Token_Factory
Same deployerA factory for pre-ERC-20 standard tokens: one call deploys a token with a chosen supply and records it under the caller's address.
0x91d050...54ba99August 13, 2015Standard_Token
Same deployerA token built to the pre-ERC-20 Standardized Contract APIs, with sendCoin and coinBalanceOf in place of transfer and balanceOf.
0xdc3153...a8f965August 13, 2015Token
Same deployerA minimal ERC20 token with allowances: balanceOf, allowance, totalSupply, transfer, approve, transferFrom, with Transfer/Approval events. Guards balance, allowa
0x37dca3...38f00dJanuary 28, 2016Verify Token
Same deployerA ConsenSys HumanStandardToken deployed as Verify Token, symbol VTX, with 3 decimals and a fixed supply credited to its deployer.
0x584761...ea4afaJune 24, 2016Test Simon Bucks
Same deployerA ConsenSys HumanStandardToken deployed as Test Simon Bucks, symbol SBX, with 2 decimals and a fixed supply credited to its deployer.
0x42d1e2...8d55ecJuly 17, 2016Greeter
Same eraA HelloWorld greeter deployed at block 51,909 on 8 August 2015, one of a run of contracts from the same account that week.
0x412fda...7267edAugust 8, 2015