Contract 0x1ad9e7887958a6bdaf87ccaf4ef123b0daac763c

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3c80fc07551619c12cbf1cecea61764fd88f21f218dfb9aef60446ff14b39f88Return Tokens187989292021-10-11 2:06:2351 days 29 mins ago0x071c3278e7780fb57828f37906263dc8401cf8e0 IN  0x1ad9e7887958a6bdaf87ccaf4ef123b0daac763c0 FTM0.013425717132
0x0981db78edc616838d140fe70be1ffd6a1c22b3dde4b2c90271cec3eaaa4afe90x6080604066238262021-05-16 17:22:08198 days 9 hrs ago0x071c3278e7780fb57828f37906263dc8401cf8e0 IN  Contract Creation0 FTM0.03474832
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x0981db78edc616838d140fe70be1ffd6a1c22b3dde4b2c90271cec3eaaa4afe966238262021-05-16 17:22:08198 days 9 hrs ago 0x071c3278e7780fb57828f37906263dc8401cf8e0  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenLock

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at FtmScan.com on 2021-05-16
*/

//SPDX-License-Identifier: MIT

pragma solidity ^0.7.4;

/**
 * Provides a time-locked function to return any tokens sent to this address.
 */

interface IERC20 {
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
}

contract TokenLock {
    address owner;
    uint256 lockedUntil;
    
    constructor(){
        owner = msg.sender;
        lockedUntil = block.timestamp + 6 weeks;
    }
    
    function returnTokens(address token) external {
        require(timeUntilUnlock() == 0, "Tokens are still locked"); 
        require(msg.sender == owner, "Can only return tokens to contract owner");
        
        IERC20(token).transfer(owner, IERC20(token).balanceOf(address(this)));
    }
    
    function returnTokenAmount(address token, uint256 amount) external {
        require(timeUntilUnlock() == 0, "Tokens are still locked"); 
        require(msg.sender == owner, "Can only return tokens to contract owner");
        
        IERC20(token).transfer(owner, amount);
    }
    
    function timeUntilUnlock() public view returns (uint256) {
        if(lockedUntil > block.timestamp){ return lockedUntil - block.timestamp; }
        return 0;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"returnTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"returnTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeUntilUnlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062375f0042016001819055506105f88061006c6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806339835c5c14610046578063a12219c614610094578063d3ef7740146100b2575b600080fd5b6100926004803603604081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506100f6565b005b61009c6102e8565b6040518082815260200191505060405180910390f35b6100f4600480360360208110156100c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610308565b005b60006101006102e8565b14610173576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f546f6b656e7320617265207374696c6c206c6f636b656400000000000000000081525060200191505060405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061059b6028913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b505050506040513d60208110156102d257600080fd5b8101908080519060200190929190505050505050565b60004260015411156103005742600154039050610305565b600090505b90565b60006103126102e8565b14610385576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f546f6b656e7320617265207374696c6c206c6f636b656400000000000000000081525060200191505060405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061059b6028913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156104cd57600080fd5b505afa1580156104e1573d6000803e3d6000fd5b505050506040513d60208110156104f757600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561055b57600080fd5b505af115801561056f573d6000803e3d6000fd5b505050506040513d602081101561058557600080fd5b8101908080519060200190929190505050505056fe43616e206f6e6c792072657475726e20746f6b656e7320746f20636f6e7472616374206f776e6572a26469706673582212202b71603e00b41914a22818dea262c0f65666ac5798f6eb7daef47b86fde455a464736f6c63430007040033

Deployed ByteCode Sourcemap

334:968:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;833:286;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1131:168;;;:::i;:::-;;;;;;;;;;;;;;;;;;;524:297;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;833:286;940:1;919:17;:15;:17::i;:::-;:22;911:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1003:5;;;;;;;;;;989:19;;:10;:19;;;981:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1081:5;1074:22;;;1097:5;;;;;;;;;;1104:6;1074:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;833:286;;:::o;1131:168::-;1179:7;1216:15;1202:11;;:29;1199:74;;;1255:15;1241:11;;:29;1234:36;;;;1199:74;1290:1;1283:8;;1131:168;;:::o;524:297::-;610:1;589:17;:15;:17::i;:::-;:22;581:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;673:5;;;;;;;;;;659:19;;:10;:19;;;651:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;751:5;744:22;;;767:5;;;;;;;;;;781;774:23;;;806:4;774:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;744:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;524:297;:::o

Swarm Source

ipfs://2b71603e00b41914a22818dea262c0f65666ac5798f6eb7daef47b86fde455a4
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.