Skip to content
Verified contractPartial

Lock

Address0x2c1dff6e620ed81ffdb985345070ff447590dc13
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.5.15

 

Same code

9,692 more contracts

 

Details

Compiler
solc 0.5.15+commit.6a57276f
Language
solidity
Optimization
Yes, 200 runs
EVM version
istanbul
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
10,945,997
Creation transaction
0x13849ba4f1…5698ca65b2
Main copy (most transactions)
0x09f58671…8e6cf4b3

Lock.sol

pragma solidity 0.5.15;

contract Lock {
    // address owner; slot #0
    // address unlockTime; slot #1
    constructor (address owner, uint256 unlockTime) public payable {
        assembly {
            sstore(0x00, owner)
            sstore(0x01, unlockTime)
        }
    }

    /**
    * @dev        Withdraw function once timestamp has passed unlock time
    */
    function () external payable {
        assembly {
            switch gt(timestamp, sload(0x01))
            case 0 { revert(0, 0) }
            case 1 {
                switch call(gas, sload(0x00), balance(address), 0, 0, 0, 0)
                case 0 { revert(0, 0) }
            }
        }
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "istanbul",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.