Skip to content
Verified contractPartial

CoinLock

Address0x624cfdfe5d038df1f048fed796c615a484d1354d
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.1.3

 

Same code

7 more contracts

 

Details

Compiler
solc 0.1.3+commit.028f561d
Language
solidity
Optimization
No
License
Not stated
Match
Partialcreation code: no, runtime code: yes
Verified on Sourcify
Created in block
220,527
Creation transaction
0x738a92a3fa…6a95f607cf

CoinLock.sol

// Submitted by EthereumHistory (ethereumhistory.com)
contract owned {
    function owned() {
        owner = msg.sender;
    }
    modifier onlyowner() { 
        if (msg.sender == owner)
            _
    }
    address owner;
}
contract CoinLock is owned {
    uint public expiration; // Timestamp in # of seconds.
    
    function lock(uint _expiration) onlyowner returns (bool) {
        if (_expiration > block.timestamp && expiration == 0) {
            expiration = _expiration;
            return true;
        }
        return false;
    }
    function redeem() onlyowner {
        if (block.timestamp > expiration) {
            suicide(owner);
        }
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.