ETH Price: $3,387.28 (+1.19%)

Contract

0x12b470a5c9055D312E1Af0259b65976DcE608e5D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Write88922312019-11-07 21:00:031873 days ago1573160403IN
0x12b470a5...DcE608e5D
0 ETH0.000139885
Write88919572019-11-07 20:00:311873 days ago1573156831IN
0x12b470a5...DcE608e5D
0 ETH0.000027971
Write88917162019-11-07 19:00:151873 days ago1573153215IN
0x12b470a5...DcE608e5D
0 ETH0.000028041
Write88914712019-11-07 18:00:271873 days ago1573149627IN
0x12b470a5...DcE608e5D
0 ETH0.000028041
Write88912082019-11-07 17:01:571873 days ago1573146117IN
0x12b470a5...DcE608e5D
0 ETH0.000028041
Write88909242019-11-07 16:00:081873 days ago1573142408IN
0x12b470a5...DcE608e5D
0 ETH0.0003589212.8
Write88906942019-11-07 15:04:181873 days ago1573139058IN
0x12b470a5...DcE608e5D
0 ETH0.000056082
Write88904002019-11-07 14:01:111873 days ago1573135271IN
0x12b470a5...DcE608e5D
0 ETH0.0004028614.4
Write88901522019-11-07 13:02:221873 days ago1573131742IN
0x12b470a5...DcE608e5D
0 ETH0.0005595420
Write88899132019-11-07 12:06:081873 days ago1573128368IN
0x12b470a5...DcE608e5D
0 ETH0.0005595420
Write88896612019-11-07 11:03:131873 days ago1573124593IN
0x12b470a5...DcE608e5D
0 ETH0.0005608220
Write88895272019-11-07 10:31:281873 days ago1573122688IN
0x12b470a5...DcE608e5D
0 ETH0.0005608220
Write88893082019-11-07 9:40:131873 days ago1573119613IN
0x12b470a5...DcE608e5D
0 ETH0.0005608220
Write88889072019-11-07 8:03:391873 days ago1573113819IN
0x12b470a5...DcE608e5D
0 ETH0.000092533.3
Write88886332019-11-07 7:02:131873 days ago1573110133IN
0x12b470a5...DcE608e5D
0 ETH0.000056082
Write88883852019-11-07 6:00:391873 days ago1573106439IN
0x12b470a5...DcE608e5D
0 ETH0.000055952
Write88832022019-11-06 10:00:151874 days ago1573034415IN
0x12b470a5...DcE608e5D
0 ETH0.000139885
Write88829302019-11-06 9:00:331874 days ago1573030833IN
0x12b470a5...DcE608e5D
0 ETH0.000223818
Write88826952019-11-06 8:00:071874 days ago1573027207IN
0x12b470a5...DcE608e5D
0 ETH0.000168246
Write88824442019-11-06 7:00:381874 days ago1573023638IN
0x12b470a5...DcE608e5D
0 ETH0.000139885
Write88821882019-11-06 6:02:561874 days ago1573020176IN
0x12b470a5...DcE608e5D
0 ETH0.000042061.5
Write88819252019-11-06 5:00:141874 days ago1573016414IN
0x12b470a5...DcE608e5D
0 ETH0.000042061.5
Write88816532019-11-06 4:01:531874 days ago1573012913IN
0x12b470a5...DcE608e5D
0 ETH0.000083933
Write88813762019-11-06 3:01:331875 days ago1573009293IN
0x12b470a5...DcE608e5D
0 ETH0.000086723.1
Write88811202019-11-06 2:01:261875 days ago1573005686IN
0x12b470a5...DcE608e5D
0 ETH0.000041.43
View all transactions

Advanced mode:
Parent Transaction Hash Block
From
To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Lighthouse

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-10-08
*/

pragma solidity ^0.4.24;

// Searcher is an interface for contracts that want to be notified of incoming data
//
contract Searcher {

    // poke is called when new data arrives
    //
    function poke() public;

    // this is called to ensure that only valid Searchers can be added to the Lighthouse - returns an arbitrarily chosen number
    //
    function identify() external pure returns(uint) {
        return 0xda4b055; 
    }
}

// for operation of this contract see the readme file.
//
contract Lighthouse {
    
    address public auth = msg.sender; // ownable model. No real value in making it transferrable.

    Searcher seeker;                  // a single contract that can be notified of data changes

    uint value;                       // holds all the data bit fiddled into a single 32 byte word.

    uint maxAge;                      // if non zero, sets a limit to data validity

    // admin functions
    
    modifier onlyAuth {
        require(auth == msg.sender, "Unauthorised access");
        _;
    }

    function changeAuth(address newAuth) public onlyAuth {
        auth = newAuth;
    }

    function changeSearcher(Searcher newSeeker) public onlyAuth {
        seeker = newSeeker;
        require(seeker.identify() == 0xda4b055,"invalid searcher");
    }

    function setMaxAge(uint newMaxAge) public onlyAuth {
        maxAge = newMaxAge;
    }
    
    function notTooLongSinceUpdated() public view returns (bool) {
        uint since = now - ((value >> 128) & 
        0x000000000000000000000000000000000000000000000000ffffffffffffffff);
        return (since < maxAge) || (maxAge == 0);
    }
    
    function peekData() external view returns (uint128 v,bool b) {
        v = uint128(value);
        b = notTooLongSinceUpdated() && value != 0;
        return;
    }
    
    function peekUpdated()  external view returns (uint32 v,bool b) {
        uint v2 = value >> 128;
        v = uint32(v2);
        b = notTooLongSinceUpdated() && value != 0;
        return;
    }
    
    function peekLastNonce() external view returns (uint32 v,bool b) {
        uint v2 = value >> 192;
        v = uint32(v2);
        b = notTooLongSinceUpdated() && value != 0;
        return;
    }

    function peek() external view returns (bytes32 v ,bool ok) {
        v = bytes32(value & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff);
        ok = notTooLongSinceUpdated() && value != 0;
        return;
    }
    
    function read() external view returns (bytes32 x) {
        require(notTooLongSinceUpdated() && value != 0, "Invalid data stored");
        return bytes32(value & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff);
    }
    
    function write(uint  DataValue, uint nonce) external onlyAuth {
        require ((DataValue >> 128) == 0, "Value too large");
        require ((nonce >> 32) == 0, "Nonce too large");
        value = DataValue + (nonce << 192) + (now << 128) ;
        if (address(seeker) != address(0)) {
            seeker.poke();
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"newAuth","type":"address"}],"name":"changeAuth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"peekData","outputs":[{"name":"v","type":"uint128"},{"name":"b","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"read","outputs":[{"name":"x","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"peek","outputs":[{"name":"v","type":"bytes32"},{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newMaxAge","type":"uint256"}],"name":"setMaxAge","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"DataValue","type":"uint256"},{"name":"nonce","type":"uint256"}],"name":"write","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"peekUpdated","outputs":[{"name":"v","type":"uint32"},{"name":"b","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"peekLastNonce","outputs":[{"name":"v","type":"uint32"},{"name":"b","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newSeeker","type":"address"}],"name":"changeSearcher","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"auth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"notTooLongSinceUpdated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405260008054600160a060020a0319163317905534801561002257600080fd5b50610838806100326000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166322969eac81146100b3578063420b81f6146100d657806357de26a41461011757806359e02dd71461013e5780635ae28fc91461016c5780639c0e3f7a14610184578063bdf384a81461019f578063becfbf69146101d4578063d6e848ac146101e9578063de9375f21461020a578063e2f906321461023b575b600080fd5b3480156100bf57600080fd5b506100d4600160a060020a0360043516610264565b005b3480156100e257600080fd5b506100eb6102e3565b604080516fffffffffffffffffffffffffffffffff909316835290151560208301528051918290030190f35b34801561012357600080fd5b5061012c610303565b60408051918252519081900360200190f35b34801561014a57600080fd5b50610153610389565b6040805192835290151560208301528051918290030190f35b34801561017857600080fd5b506100d46004356103a8565b34801561019057600080fd5b506100d46004356024356103fd565b3480156101ab57600080fd5b506101b46105e3565b6040805163ffffffff909316835290151560208301528051918290030190f35b3480156101e057600080fd5b506101b4610619565b3480156101f557600080fd5b506100d4600160a060020a0360043516610643565b34801561021657600080fd5b5061021f6107a0565b60408051600160a060020a039092168252519081900360200190f35b34801561024757600080fd5b506102506107af565b604080519115158252519081900360200190f35b600054600160a060020a031633146102b4576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025460006102f06107af565b80156102fd575060025415155b90509091565b600061030d6107af565b801561031a575060025415155b1515610370576040805160e560020a62461bcd02815260206004820152601360248201527f496e76616c696420646174612073746f72656400000000000000000000000000604482015290519081900360640190fd5b506002546fffffffffffffffffffffffffffffffff1690565b6002546fffffffffffffffffffffffffffffffff1660006102f06107af565b600054600160a060020a031633146103f8576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b600355565b600054600160a060020a0316331461044d576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b7001000000000000000000000000000000008204156104b6576040805160e560020a62461bcd02815260206004820152600f60248201527f56616c756520746f6f206c617267650000000000000000000000000000000000604482015290519081900360640190fd5b640100000000810415610513576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f6e636520746f6f206c617267650000000000000000000000000000000000604482015290519081900360640190fd5b780100000000000000000000000000000000000000000000000081028201700100000000000000000000000000000000420201600255600154600160a060020a0316156105df57600160009054906101000a9004600160a060020a0316600160a060020a031663181783586040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156105c657600080fd5b505af11580156105da573d6000803e3d6000fd5b505050505b5050565b60025470010000000000000000000000000000000090046000816106056107af565b8015610612575060025415155b9150509091565b600254780100000000000000000000000000000000000000000000000090046000816106056107af565b600054600160a060020a03163314610693576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517feeb728660000000000000000000000000000000000000000000000000000000081529051929091169163eeb72866916004808201926020929091908290030181600087803b15801561071757600080fd5b505af115801561072b573d6000803e3d6000fd5b505050506040513d602081101561074157600080fd5b5051630da4b0551461079d576040805160e560020a62461bcd02815260206004820152601060248201527f696e76616c696420736561726368657200000000000000000000000000000000604482015290519081900360640190fd5b50565b600054600160a060020a031681565b600254600354600091700100000000000000000000000000000000900467ffffffffffffffff164203908110806107e65750600354155b915050905600556e617574686f72697365642061636365737300000000000000000000000000a165627a7a723058205dca79bc6ab7d02d47bb4127d4f2cb4ddf33771c7ba6c7b13ca8bf584586376c0029

Deployed Bytecode

0x6080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166322969eac81146100b3578063420b81f6146100d657806357de26a41461011757806359e02dd71461013e5780635ae28fc91461016c5780639c0e3f7a14610184578063bdf384a81461019f578063becfbf69146101d4578063d6e848ac146101e9578063de9375f21461020a578063e2f906321461023b575b600080fd5b3480156100bf57600080fd5b506100d4600160a060020a0360043516610264565b005b3480156100e257600080fd5b506100eb6102e3565b604080516fffffffffffffffffffffffffffffffff909316835290151560208301528051918290030190f35b34801561012357600080fd5b5061012c610303565b60408051918252519081900360200190f35b34801561014a57600080fd5b50610153610389565b6040805192835290151560208301528051918290030190f35b34801561017857600080fd5b506100d46004356103a8565b34801561019057600080fd5b506100d46004356024356103fd565b3480156101ab57600080fd5b506101b46105e3565b6040805163ffffffff909316835290151560208301528051918290030190f35b3480156101e057600080fd5b506101b4610619565b3480156101f557600080fd5b506100d4600160a060020a0360043516610643565b34801561021657600080fd5b5061021f6107a0565b60408051600160a060020a039092168252519081900360200190f35b34801561024757600080fd5b506102506107af565b604080519115158252519081900360200190f35b600054600160a060020a031633146102b4576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025460006102f06107af565b80156102fd575060025415155b90509091565b600061030d6107af565b801561031a575060025415155b1515610370576040805160e560020a62461bcd02815260206004820152601360248201527f496e76616c696420646174612073746f72656400000000000000000000000000604482015290519081900360640190fd5b506002546fffffffffffffffffffffffffffffffff1690565b6002546fffffffffffffffffffffffffffffffff1660006102f06107af565b600054600160a060020a031633146103f8576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b600355565b600054600160a060020a0316331461044d576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b7001000000000000000000000000000000008204156104b6576040805160e560020a62461bcd02815260206004820152600f60248201527f56616c756520746f6f206c617267650000000000000000000000000000000000604482015290519081900360640190fd5b640100000000810415610513576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f6e636520746f6f206c617267650000000000000000000000000000000000604482015290519081900360640190fd5b780100000000000000000000000000000000000000000000000081028201700100000000000000000000000000000000420201600255600154600160a060020a0316156105df57600160009054906101000a9004600160a060020a0316600160a060020a031663181783586040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156105c657600080fd5b505af11580156105da573d6000803e3d6000fd5b505050505b5050565b60025470010000000000000000000000000000000090046000816106056107af565b8015610612575060025415155b9150509091565b600254780100000000000000000000000000000000000000000000000090046000816106056107af565b600054600160a060020a03163314610693576040805160e560020a62461bcd02815260206004820152601360248201526000805160206107ed833981519152604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517feeb728660000000000000000000000000000000000000000000000000000000081529051929091169163eeb72866916004808201926020929091908290030181600087803b15801561071757600080fd5b505af115801561072b573d6000803e3d6000fd5b505050506040513d602081101561074157600080fd5b5051630da4b0551461079d576040805160e560020a62461bcd02815260206004820152601060248201527f696e76616c696420736561726368657200000000000000000000000000000000604482015290519081900360640190fd5b50565b600054600160a060020a031681565b600254600354600091700100000000000000000000000000000000900467ffffffffffffffff164203908110806107e65750600354155b915050905600556e617574686f72697365642061636365737300000000000000000000000000a165627a7a723058205dca79bc6ab7d02d47bb4127d4f2cb4ddf33771c7ba6c7b13ca8bf584586376c0029

Swarm Source

bzzr://5dca79bc6ab7d02d47bb4127d4f2cb4ddf33771c7ba6c7b13ca8bf584586376c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.