Source Code
Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 18561081 | 1405 days ago | IN | 0 BNB | 0.00019597 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Timelock
Compiler Version
v0.8.0+commit.c7dfd78e
Contract Source Code (Solidity)
/**
*Submitted for verification at BscScan.com on 2021-06-08
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
/**
* @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 Timelock {
uint public constant duration = 365 days;
uint public immutable end;
address payable public immutable owner;
constructor(address payable _owner) {
end = block.timestamp + duration;
owner = _owner;
}
function deposit(address token, uint amount) external {
IERC20(token).transferFrom(msg.sender, address(this), amount);
}
receive() external payable {}
function withdraw(address token, uint amount) external {
require(msg.sender == owner, 'only owner');
require(block.timestamp >= end, 'too early');
if(token == address(0)) {
owner.transfer(amount);
} else {
IERC20(token).transfer(owner, amount);
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address payable","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60c060405234801561001057600080fd5b506040516109883803806109888339818101604052810190610032919061009b565b6301e133804261004291906100c4565b608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505061019c565b60008151905061009581610185565b92915050565b6000602082840312156100ad57600080fd5b60006100bb84828501610086565b91505092915050565b60006100cf8261014c565b91506100da8361014c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561010f5761010e610156565b5b828201905092915050565b60006101258261012c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61018e8161011a565b811461019957600080fd5b50565b60805160a05160601c6107a86101e0600039600081816101cb015281816102130152818161033901526103c10152600081816101ef01526102a101526107a86000f3fe60806040526004361061004e5760003560e01c80630fb5a6b41461005a57806347e7ef24146100855780638da5cb5b146100ae578063efbe1c1c146100d9578063f3fef3a31461010457610055565b3661005557005b600080fd5b34801561006657600080fd5b5061006f61012d565b60405161007c9190610671565b60405180910390f35b34801561009157600080fd5b506100ac60048036038101906100a79190610495565b610135565b005b3480156100ba57600080fd5b506100c36101c9565b6040516100d091906105b6565b60405180910390f35b3480156100e557600080fd5b506100ee6101ed565b6040516100fb9190610671565b60405180910390f35b34801561011057600080fd5b5061012b60048036038101906101269190610495565b610211565b005b6301e1338081565b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401610172939291906105fa565b602060405180830381600087803b15801561018c57600080fd5b505af11580156101a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c491906104d1565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461029f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029690610631565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000421015610302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f990610651565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156103a3577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561039d573d6000803e3d6000fd5b50610452565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b81526004016103fe9291906105d1565b602060405180830381600087803b15801561041857600080fd5b505af115801561042c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045091906104d1565b505b5050565b6000813590506104658161072d565b92915050565b60008151905061047a81610744565b92915050565b60008135905061048f8161075b565b92915050565b600080604083850312156104a857600080fd5b60006104b685828601610456565b92505060206104c785828601610480565b9150509250929050565b6000602082840312156104e357600080fd5b60006104f18482850161046b565b91505092915050565b610503816106f7565b82525050565b610512816106af565b82525050565b6105218161069d565b82525050565b6000610534600a8361068c565b91507f6f6e6c79206f776e6572000000000000000000000000000000000000000000006000830152602082019050919050565b600061057460098361068c565b91507f746f6f206561726c7900000000000000000000000000000000000000000000006000830152602082019050919050565b6105b0816106ed565b82525050565b60006020820190506105cb6000830184610509565b92915050565b60006040820190506105e660008301856104fa565b6105f360208301846105a7565b9392505050565b600060608201905061060f6000830186610518565b61061c6020830185610518565b61062960408301846105a7565b949350505050565b6000602082019050818103600083015261064a81610527565b9050919050565b6000602082019050818103600083015261066a81610567565b9050919050565b600060208201905061068660008301846105a7565b92915050565b600082825260208201905092915050565b60006106a8826106cd565b9050919050565b60006106ba826106cd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061070282610709565b9050919050565b60006107148261071b565b9050919050565b6000610726826106cd565b9050919050565b6107368161069d565b811461074157600080fd5b50565b61074d816106c1565b811461075857600080fd5b50565b610764816106ed565b811461076f57600080fd5b5056fea2646970667358221220676f9e7dd1e47c07003d4920d9c7df8e22f6680abc87aa207141308241e9fac264736f6c63430008000033000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f9160
Deployed Bytecode
0x60806040526004361061004e5760003560e01c80630fb5a6b41461005a57806347e7ef24146100855780638da5cb5b146100ae578063efbe1c1c146100d9578063f3fef3a31461010457610055565b3661005557005b600080fd5b34801561006657600080fd5b5061006f61012d565b60405161007c9190610671565b60405180910390f35b34801561009157600080fd5b506100ac60048036038101906100a79190610495565b610135565b005b3480156100ba57600080fd5b506100c36101c9565b6040516100d091906105b6565b60405180910390f35b3480156100e557600080fd5b506100ee6101ed565b6040516100fb9190610671565b60405180910390f35b34801561011057600080fd5b5061012b60048036038101906101269190610495565b610211565b005b6301e1338081565b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401610172939291906105fa565b602060405180830381600087803b15801561018c57600080fd5b505af11580156101a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c491906104d1565b505050565b7f000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f916081565b7f0000000000000000000000000000000000000000000000000000000062a0ddc781565b7f000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f916073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461029f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029690610631565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000062a0ddc7421015610302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f990610651565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156103a3577f000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f916073ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561039d573d6000803e3d6000fd5b50610452565b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb7f000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f9160836040518363ffffffff1660e01b81526004016103fe9291906105d1565b602060405180830381600087803b15801561041857600080fd5b505af115801561042c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045091906104d1565b505b5050565b6000813590506104658161072d565b92915050565b60008151905061047a81610744565b92915050565b60008135905061048f8161075b565b92915050565b600080604083850312156104a857600080fd5b60006104b685828601610456565b92505060206104c785828601610480565b9150509250929050565b6000602082840312156104e357600080fd5b60006104f18482850161046b565b91505092915050565b610503816106f7565b82525050565b610512816106af565b82525050565b6105218161069d565b82525050565b6000610534600a8361068c565b91507f6f6e6c79206f776e6572000000000000000000000000000000000000000000006000830152602082019050919050565b600061057460098361068c565b91507f746f6f206561726c7900000000000000000000000000000000000000000000006000830152602082019050919050565b6105b0816106ed565b82525050565b60006020820190506105cb6000830184610509565b92915050565b60006040820190506105e660008301856104fa565b6105f360208301846105a7565b9392505050565b600060608201905061060f6000830186610518565b61061c6020830185610518565b61062960408301846105a7565b949350505050565b6000602082019050818103600083015261064a81610527565b9050919050565b6000602082019050818103600083015261066a81610567565b9050919050565b600060208201905061068660008301846105a7565b92915050565b600082825260208201905092915050565b60006106a8826106cd565b9050919050565b60006106ba826106cd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061070282610709565b9050919050565b60006107148261071b565b9050919050565b6000610726826106cd565b9050919050565b6107368161069d565b811461074157600080fd5b50565b61074d816106c1565b811461075857600080fd5b50565b610764816106ed565b811461076f57600080fd5b5056fea2646970667358221220676f9e7dd1e47c07003d4920d9c7df8e22f6680abc87aa207141308241e9fac264736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f9160
-----Decoded View---------------
Arg [0] : _owner (address): 0xFEc8Cd44199F236F57da63B80b9b5a8cf89f9160
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000fec8cd44199f236f57da63b80b9b5a8cf89f9160
Deployed Bytecode Sourcemap
2772:715:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2795:40;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3024:128;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2870:38;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2840:25;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3193:291;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2795:40;2827:8;2795:40;:::o;3024:128::-;3092:5;3085:26;;;3112:10;3132:4;3139:6;3085:61;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3024:128;;:::o;2870:38::-;;;:::o;2840:25::-;;;:::o;3193:291::-;3277:5;3263:19;;:10;:19;;;3255:42;;;;;;;;;;;;:::i;:::-;;;;;;;;;3331:3;3312:15;:22;;3304:44;;;;;;;;;;;;:::i;:::-;;;;;;;;;3375:1;3358:19;;:5;:19;;;3355:124;;;3389:5;:14;;:22;3404:6;3389:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3355:124;;;3441:5;3434:22;;;3457:5;3464:6;3434:37;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3355:124;3193:291;;:::o;7:139:1:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:137::-;;237:6;231:13;222:22;;253:30;277:5;253:30;:::i;:::-;212:77;;;;:::o;295:139::-;;379:6;366:20;357:29;;395:33;422:5;395:33;:::i;:::-;347:87;;;;:::o;440:407::-;;;565:2;553:9;544:7;540:23;536:32;533:2;;;581:1;578;571:12;533:2;624:1;649:53;694:7;685:6;674:9;670:22;649:53;:::i;:::-;639:63;;595:117;751:2;777:53;822:7;813:6;802:9;798:22;777:53;:::i;:::-;767:63;;722:118;523:324;;;;;:::o;853:278::-;;969:2;957:9;948:7;944:23;940:32;937:2;;;985:1;982;975:12;937:2;1028:1;1053:61;1106:7;1097:6;1086:9;1082:22;1053:61;:::i;:::-;1043:71;;999:125;927:204;;;;:::o;1137:147::-;1232:45;1271:5;1232:45;:::i;:::-;1227:3;1220:58;1210:74;;:::o;1290:142::-;1393:32;1419:5;1393:32;:::i;:::-;1388:3;1381:45;1371:61;;:::o;1438:118::-;1525:24;1543:5;1525:24;:::i;:::-;1520:3;1513:37;1503:53;;:::o;1562:308::-;;1725:67;1789:2;1784:3;1725:67;:::i;:::-;1718:74;;1822:12;1818:1;1813:3;1809:11;1802:33;1861:2;1856:3;1852:12;1845:19;;1708:162;;;:::o;1876:306::-;;2039:66;2103:1;2098:3;2039:66;:::i;:::-;2032:73;;2135:11;2131:1;2126:3;2122:11;2115:32;2173:2;2168:3;2164:12;2157:19;;2022:160;;;:::o;2188:118::-;2275:24;2293:5;2275:24;:::i;:::-;2270:3;2263:37;2253:53;;:::o;2312:254::-;;2459:2;2448:9;2444:18;2436:26;;2472:87;2556:1;2545:9;2541:17;2532:6;2472:87;:::i;:::-;2426:140;;;;:::o;2572:348::-;;2739:2;2728:9;2724:18;2716:26;;2752:79;2828:1;2817:9;2813:17;2804:6;2752:79;:::i;:::-;2841:72;2909:2;2898:9;2894:18;2885:6;2841:72;:::i;:::-;2706:214;;;;;:::o;2926:442::-;;3113:2;3102:9;3098:18;3090:26;;3126:71;3194:1;3183:9;3179:17;3170:6;3126:71;:::i;:::-;3207:72;3275:2;3264:9;3260:18;3251:6;3207:72;:::i;:::-;3289;3357:2;3346:9;3342:18;3333:6;3289:72;:::i;:::-;3080:288;;;;;;:::o;3374:419::-;;3578:2;3567:9;3563:18;3555:26;;3627:9;3621:4;3617:20;3613:1;3602:9;3598:17;3591:47;3655:131;3781:4;3655:131;:::i;:::-;3647:139;;3545:248;;;:::o;3799:419::-;;4003:2;3992:9;3988:18;3980:26;;4052:9;4046:4;4042:20;4038:1;4027:9;4023:17;4016:47;4080:131;4206:4;4080:131;:::i;:::-;4072:139;;3970:248;;;:::o;4224:222::-;;4355:2;4344:9;4340:18;4332:26;;4368:71;4436:1;4425:9;4421:17;4412:6;4368:71;:::i;:::-;4322:124;;;;:::o;4452:169::-;;4570:6;4565:3;4558:19;4610:4;4605:3;4601:14;4586:29;;4548:73;;;;:::o;4627:96::-;;4693:24;4711:5;4693:24;:::i;:::-;4682:35;;4672:51;;;:::o;4729:104::-;;4803:24;4821:5;4803:24;:::i;:::-;4792:35;;4782:51;;;:::o;4839:90::-;;4916:5;4909:13;4902:21;4891:32;;4881:48;;;:::o;4935:126::-;;5012:42;5005:5;5001:54;4990:65;;4980:81;;;:::o;5067:77::-;;5133:5;5122:16;;5112:32;;;:::o;5150:134::-;;5241:37;5272:5;5241:37;:::i;:::-;5228:50;;5218:66;;;:::o;5290:126::-;;5373:37;5404:5;5373:37;:::i;:::-;5360:50;;5350:66;;;:::o;5422:113::-;;5505:24;5523:5;5505:24;:::i;:::-;5492:37;;5482:53;;;:::o;5541:122::-;5614:24;5632:5;5614:24;:::i;:::-;5607:5;5604:35;5594:2;;5653:1;5650;5643:12;5594:2;5584:79;:::o;5669:116::-;5739:21;5754:5;5739:21;:::i;:::-;5732:5;5729:32;5719:2;;5775:1;5772;5765:12;5719:2;5709:76;:::o;5791:122::-;5864:24;5882:5;5864:24;:::i;:::-;5857:5;5854:35;5844:2;;5903:1;5900;5893:12;5844:2;5834:79;:::o
Swarm Source
ipfs://676f9e7dd1e47c07003d4920d9c7df8e22f6680abc87aa207141308241e9fac2
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in BNB
Multichain Portfolio | 32 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.