Goerli Testnet

Contract

0x4cD014AC64AAa899b46BF3a477B68bb67e33eDC4
Source Code

Multi Chain

Multichain Addresses

1 address found via
Transaction Hash
Method
Block
From
To
Value
Store Block Head...101771122023-12-08 5:59:482 days 1 hr ago1702015188IN
0x4cD014...7e33eDC4
0 ETH00.00000001
Store Block Head...101768732023-12-08 5:00:242 days 2 hrs ago1702011624IN
0x4cD014...7e33eDC4
0 ETH00.00000001
Store Block Head...101753312023-12-07 22:12:482 days 9 hrs ago1701987168IN
0x4cD014...7e33eDC4
0 ETH00.00000001
Store Block Head...101750842023-12-07 21:09:242 days 10 hrs ago1701983364IN
0x4cD014...7e33eDC4
0 ETH00.00000001
Store Block Head...101748862023-12-07 20:09:482 days 11 hrs ago1701979788IN
0x4cD014...7e33eDC4
0 ETH00.00000096
Store Block Head...101745602023-12-07 18:42:242 days 12 hrs ago1701974544IN
0x4cD014...7e33eDC4
0 ETH0.000000010.00023528
Store Block Head...101745502023-12-07 18:39:362 days 13 hrs ago1701974376IN
0x4cD014...7e33eDC4
0 ETH0.000000010.00040545
Store Block Head...101745112023-12-07 18:29:482 days 13 hrs ago1701973788IN
0x4cD014...7e33eDC4
0 ETH0.000000020.00056583
Store Block Head...101745062023-12-07 18:28:362 days 13 hrs ago1701973716IN
0x4cD014...7e33eDC4
0 ETH0.000000020.00057124
Store Block Head...101745052023-12-07 18:28:242 days 13 hrs ago1701973704IN
0x4cD014...7e33eDC4
0 ETH0.000000020.00060495
Store Block Head...101744292023-12-07 18:08:242 days 13 hrs ago1701972504IN
0x4cD014...7e33eDC4
0 ETH0.000000650.01425916
Store Block Head...101744102023-12-07 18:04:122 days 13 hrs ago1701972252IN
0x4cD014...7e33eDC4
0 ETH0.000001550.03404988
Store Block Head...101666102023-12-06 8:10:243 days 23 hrs ago1701850224IN
0x4cD014...7e33eDC4
0 ETH0.000001140.02509306
Store Block Head...101664772023-12-06 7:34:484 days 6 mins ago1701848088IN
0x4cD014...7e33eDC4
0 ETH0.000068571.50000001
Store Block Head...101639582023-12-05 21:04:364 days 10 hrs ago1701810276IN
0x4cD014...7e33eDC4
0 ETH0.000000170.00380198
Store Block Head...101638522023-12-05 20:38:244 days 11 hrs ago1701808704IN
0x4cD014...7e33eDC4
0 ETH0.000045731.00039534
Store Block Head...98815262023-10-17 9:10:4853 days 22 hrs ago1697533848IN
0x4cD014...7e33eDC4
0 ETH0.000068571.50000001
Store Block Head...92044132023-06-19 11:44:12173 days 19 hrs ago1687175052IN
0x4cD014...7e33eDC4
0 ETH0.0003946916.2780318
Store Block Head...88962102023-04-26 18:18:36227 days 13 hrs ago1682533116IN
0x4cD014...7e33eDC4
0 ETH0.0004644310.15851998
Store Block Head...88905402023-04-25 18:12:36228 days 13 hrs ago1682446356IN
0x4cD014...7e33eDC4
0 ETH0.0003897316.07341943
0x6080604088902422023-04-25 16:56:36228 days 14 hrs ago1682441796IN
 Create: HeaderStorage
0 ETH0.0120164627.76838911

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
101884002023-12-10 7:12:1228 mins ago1702192332
0x4cD014...7e33eDC4
0 ETH
101881702023-12-10 6:12:121 hr 28 mins ago1702188732
0x4cD014...7e33eDC4
0 ETH
101879422023-12-10 5:12:242 hrs 28 mins ago1702185144
0x4cD014...7e33eDC4
0 ETH
101877172023-12-10 4:12:123 hrs 28 mins ago1702181532
0x4cD014...7e33eDC4
0 ETH
101874932023-12-10 3:12:244 hrs 28 mins ago1702177944
0x4cD014...7e33eDC4
0 ETH
101872662023-12-10 2:12:245 hrs 28 mins ago1702174344
0x4cD014...7e33eDC4
0 ETH
101870352023-12-10 1:12:126 hrs 28 mins ago1702170732
0x4cD014...7e33eDC4
0 ETH
101867942023-12-10 0:13:007 hrs 28 mins ago1702167180
0x4cD014...7e33eDC4
0 ETH
101865582023-12-09 23:12:248 hrs 28 mins ago1702163544
0x4cD014...7e33eDC4
0 ETH
101863322023-12-09 22:12:129 hrs 28 mins ago1702159932
0x4cD014...7e33eDC4
0 ETH
101861062023-12-09 21:12:1210 hrs 28 mins ago1702156332
0x4cD014...7e33eDC4
0 ETH
101858702023-12-09 20:12:2411 hrs 28 mins ago1702152744
0x4cD014...7e33eDC4
0 ETH
101856292023-12-09 19:12:2412 hrs 28 mins ago1702149144
0x4cD014...7e33eDC4
0 ETH
101853922023-12-09 18:12:2413 hrs 28 mins ago1702145544
0x4cD014...7e33eDC4
0 ETH
101851552023-12-09 17:12:2414 hrs 28 mins ago1702141944
0x4cD014...7e33eDC4
0 ETH
101849302023-12-09 16:13:0015 hrs 28 mins ago1702138380
0x4cD014...7e33eDC4
0 ETH
101846992023-12-09 15:12:1216 hrs 28 mins ago1702134732
0x4cD014...7e33eDC4
0 ETH
101844742023-12-09 14:12:1217 hrs 28 mins ago1702131132
0x4cD014...7e33eDC4
0 ETH
101842682023-12-09 13:12:3618 hrs 28 mins ago1702127556
0x4cD014...7e33eDC4
0 ETH
101840502023-12-09 12:13:0019 hrs 28 mins ago1702123980
0x4cD014...7e33eDC4
0 ETH
101838142023-12-09 11:12:1220 hrs 28 mins ago1702120332
0x4cD014...7e33eDC4
0 ETH
101835882023-12-09 10:12:1221 hrs 28 mins ago1702116732
0x4cD014...7e33eDC4
0 ETH
101833642023-12-09 9:12:1222 hrs 28 mins ago1702113132
0x4cD014...7e33eDC4
0 ETH
101831342023-12-09 8:13:0023 hrs 28 mins ago1702109580
0x4cD014...7e33eDC4
0 ETH
101828982023-12-09 7:12:241 day 28 mins ago1702105944
0x4cD014...7e33eDC4
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HeaderStorage

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : HeaderStorage.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.17;

contract HeaderStorage {
    mapping(uint256 => bytes32) public headers;

    event HeaderStored(uint256 indexed blockNumber, bytes32 indexed blockHeader);

    error HeaderOutOfRange(address emitter, uint256 blockNumber);

    /// @dev Stores and returns the header for the given block.
    /// @param blockNumber Block number.
    /// @return blockHeader Block header stored.
    /// @notice Reverts if the given block header was not previously stored and is now out of range.
    function storeBlockHeader(uint256 blockNumber) public returns (bytes32 blockHeader) {
        blockHeader = headers[blockNumber];
        if (blockHeader == 0) {
            blockHeader = blockhash(blockNumber);
            if (blockHeader == 0) revert HeaderOutOfRange(address(this), blockNumber);
            headers[blockNumber] = blockHeader;
            emit HeaderStored(blockNumber, blockHeader);
        }
    }

    /// @dev Stores and returns the header for an array of given blocks.
    /// @param blockNumbers Array of block numbers.
    /// @return Array of block headers.
    /// @notice Reverts if the given block header was not previously stored and is now out of range.
    function storeBlockHeaders(uint256[] memory blockNumbers) public returns (bytes32[] memory) {
        bytes32[] memory blockHeaders = new bytes32[](blockNumbers.length);
        for (uint256 i = 0; i < blockNumbers.length; i++) {
            blockHeaders[i] = storeBlockHeader(blockNumbers[i]);
        }
        return blockHeaders;
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"emitter","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"HeaderOutOfRange","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"blockHeader","type":"bytes32"}],"name":"HeaderStored","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"headers","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"storeBlockHeader","outputs":[{"internalType":"bytes32","name":"blockHeader","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"blockNumbers","type":"uint256[]"}],"name":"storeBlockHeaders","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506106e4806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806356f90d79146100465780636c1e8a9514610076578063ceee6e55146100a6575b600080fd5b610060600480360381019061005b91906102ac565b6100d6565b60405161006d91906102f2565b60405180910390f35b610090600480360381019061008b91906102ac565b6100ee565b60405161009d91906102f2565b60405180910390f35b6100c060048036038101906100bb9190610466565b6101a7565b6040516100cd919061056d565b60405180910390f35b60006020528060005260406000206000915090505481565b60008060008381526020019081526020016000205490506000801b81036101a257814090506000801b810361015c5730826040517fb4992a6b0000000000000000000000000000000000000000000000000000000081526004016101539291906105df565b60405180910390fd5b806000808481526020019081526020016000208190555080827ff7df17dce0093aedfcbae24b4f04e823f9e863c97986ab1ba6c5267ace49ddea60405160405180910390a35b919050565b60606000825167ffffffffffffffff8111156101c6576101c5610323565b5b6040519080825280602002602001820160405280156101f45781602001602082028036833780820191505090505b50905060005b83518110156102585761022684828151811061021957610218610608565b5b60200260200101516100ee565b82828151811061023957610238610608565b5b602002602001018181525050808061025090610666565b9150506101fa565b5080915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61028981610276565b811461029457600080fd5b50565b6000813590506102a681610280565b92915050565b6000602082840312156102c2576102c161026c565b5b60006102d084828501610297565b91505092915050565b6000819050919050565b6102ec816102d9565b82525050565b600060208201905061030760008301846102e3565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61035b82610312565b810181811067ffffffffffffffff8211171561037a57610379610323565b5b80604052505050565b600061038d610262565b90506103998282610352565b919050565b600067ffffffffffffffff8211156103b9576103b8610323565b5b602082029050602081019050919050565b600080fd5b60006103e26103dd8461039e565b610383565b90508083825260208201905060208402830185811115610405576104046103ca565b5b835b8181101561042e578061041a8882610297565b845260208401935050602081019050610407565b5050509392505050565b600082601f83011261044d5761044c61030d565b5b813561045d8482602086016103cf565b91505092915050565b60006020828403121561047c5761047b61026c565b5b600082013567ffffffffffffffff81111561049a57610499610271565b5b6104a684828501610438565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6104e4816102d9565b82525050565b60006104f683836104db565b60208301905092915050565b6000602082019050919050565b600061051a826104af565b61052481856104ba565b935061052f836104cb565b8060005b8381101561056057815161054788826104ea565b975061055283610502565b925050600181019050610533565b5085935050505092915050565b60006020820190508181036000830152610587818461050f565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105ba8261058f565b9050919050565b6105ca816105af565b82525050565b6105d981610276565b82525050565b60006040820190506105f460008301856105c1565b61060160208301846105d0565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061067182610276565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036106a3576106a2610637565b5b60018201905091905056fea2646970667358221220902727d82d7b516c50558736fa370cba7722cde3470471b74b9c2e452335dbc264736f6c63430008120033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806356f90d79146100465780636c1e8a9514610076578063ceee6e55146100a6575b600080fd5b610060600480360381019061005b91906102ac565b6100d6565b60405161006d91906102f2565b60405180910390f35b610090600480360381019061008b91906102ac565b6100ee565b60405161009d91906102f2565b60405180910390f35b6100c060048036038101906100bb9190610466565b6101a7565b6040516100cd919061056d565b60405180910390f35b60006020528060005260406000206000915090505481565b60008060008381526020019081526020016000205490506000801b81036101a257814090506000801b810361015c5730826040517fb4992a6b0000000000000000000000000000000000000000000000000000000081526004016101539291906105df565b60405180910390fd5b806000808481526020019081526020016000208190555080827ff7df17dce0093aedfcbae24b4f04e823f9e863c97986ab1ba6c5267ace49ddea60405160405180910390a35b919050565b60606000825167ffffffffffffffff8111156101c6576101c5610323565b5b6040519080825280602002602001820160405280156101f45781602001602082028036833780820191505090505b50905060005b83518110156102585761022684828151811061021957610218610608565b5b60200260200101516100ee565b82828151811061023957610238610608565b5b602002602001018181525050808061025090610666565b9150506101fa565b5080915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61028981610276565b811461029457600080fd5b50565b6000813590506102a681610280565b92915050565b6000602082840312156102c2576102c161026c565b5b60006102d084828501610297565b91505092915050565b6000819050919050565b6102ec816102d9565b82525050565b600060208201905061030760008301846102e3565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61035b82610312565b810181811067ffffffffffffffff8211171561037a57610379610323565b5b80604052505050565b600061038d610262565b90506103998282610352565b919050565b600067ffffffffffffffff8211156103b9576103b8610323565b5b602082029050602081019050919050565b600080fd5b60006103e26103dd8461039e565b610383565b90508083825260208201905060208402830185811115610405576104046103ca565b5b835b8181101561042e578061041a8882610297565b845260208401935050602081019050610407565b5050509392505050565b600082601f83011261044d5761044c61030d565b5b813561045d8482602086016103cf565b91505092915050565b60006020828403121561047c5761047b61026c565b5b600082013567ffffffffffffffff81111561049a57610499610271565b5b6104a684828501610438565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6104e4816102d9565b82525050565b60006104f683836104db565b60208301905092915050565b6000602082019050919050565b600061051a826104af565b61052481856104ba565b935061052f836104cb565b8060005b8381101561056057815161054788826104ea565b975061055283610502565b925050600181019050610533565b5085935050505092915050565b60006020820190508181036000830152610587818461050f565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105ba8261058f565b9050919050565b6105ca816105af565b82525050565b6105d981610276565b82525050565b60006040820190506105f460008301856105c1565b61060160208301846105d0565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061067182610276565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036106a3576106a2610637565b5b60018201905091905056fea2646970667358221220902727d82d7b516c50558736fa370cba7722cde3470471b74b9c2e452335dbc264736f6c63430008120033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.