false
false
0
The new Blockscout UI is now open source! Learn how to deploy it here
- We're indexing this chain right now. Some of the counts may be inaccurate.

Contract Address Details

0xD3a75cE3Ce12a0AaA74e18E82A1714a21e7d7a13

Contract Name
Block
Creator
0xde984b–d986ce at 0x5b6427–df361f
Balance
0 ETH
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
5717323
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
Block




Optimization enabled
true
Compiler version
v0.8.28+commit.7893614a




Optimization runs
200
EVM Version
prague




Verified at
2026-03-10T21:51:36.570611Z

contracts/Block.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

/// @notice Dead-simple chunk store. Each block holds up to CHUNK_SIZE bytes.
contract Block {
    struct BlockData {
        uint256 id;
        bytes data;
    }

    mapping(uint256 => bytes) private _blocks;
    uint256 private _blockCount;

    event BlockCreated(uint256 indexed blockId);

    function createBlock(bytes calldata data) external returns (uint256 blockId) {
        blockId = ++_blockCount;
        _blocks[blockId] = data;
        emit BlockCreated(blockId);
    }

    function getBlock(uint256 blockId) external view returns (BlockData memory) {
        require(blockId > 0 && blockId <= _blockCount, "Block: not found");
        return BlockData(blockId, _blocks[blockId]);
    }

    function getBlockCount() external view returns (uint256) {
        return _blockCount;
    }
}
        

Compiler Settings

{"viaIR":true,"remappings":["@openzeppelin/contracts/=../../lib/openzeppelin-contracts/contracts/","forge-std/=../../lib/forge-std/src/","erc4626-tests/=/Users/Onix.Martinez/BlockProjects/web3-twitter/new_monorepo/lib/openzeppelin-contracts/lib/erc4626-tests/","halmos-cheatcodes/=/Users/Onix.Martinez/BlockProjects/web3-twitter/new_monorepo/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/","openzeppelin-contracts/=/Users/Onix.Martinez/BlockProjects/web3-twitter/new_monorepo/lib/openzeppelin-contracts/contracts/"],"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"libraries":{},"evmVersion":"prague"}
              

Contract ABI

[{"type":"event","name":"BlockCreated","inputs":[{"type":"uint256","name":"blockId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"blockId","internalType":"uint256"}],"name":"createBlock","inputs":[{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct Block.BlockData","components":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]}],"name":"getBlock","inputs":[{"type":"uint256","name":"blockId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBlockCount","inputs":[]}]
              

Contract Creation Code

0x60808060405234601557610424908161001a8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816304c0756914610207575080632681933a1461005e5763cc0bd62e1461003d575f80fd5b3461005a575f36600319011261005a576020600154604051908152f35b5f80fd5b3461005a57602036600319011261005a5760043567ffffffffffffffff811161005a573660238201121561005a5780600401359067ffffffffffffffff821161005a57366024838301011161005a576001545f1981146101f35760010180600155805f525f60205260405f206100d481546103b6565b93601f85116101ae575b602094505f601f821160011461014857819293945f9261013a575b50508160011b915f199060031b1c19161790555b60405190807f0b567c98c5fa582378ba6f26ceafdae463e045760cc7aa63e74068b24b57c85f5f80a28152f35b6024925001013585806100f9565b601f19821694835f52865f20915f5b878110610194575083600195969710610178575b505050811b01905561010d565b01602401355f19600384901b60f8161c1916905585808061016b565b909288600181926024878701013581550194019101610157565b815f5260205f20601f820160051c810195602083106101e9575b601f0160051c01945b8581106101de57506100de565b5f81556001016101d1565b90955085906101c8565b634e487b7160e01b5f52601160045260245ffd5b3461005a57602036600319011261005a5760606020600435926102298161039a565b5f815201528015158061038e575b1561035657805f525f60205260405f2090604051906102558261039a565b8152604051915f90805490610269826103b6565b80865291600181169081156103385750600114610300575b5050829003601f01601f191682019067ffffffffffffffff8211838310176102ec576080916040526020810192835260206040519384928284525182840152516040808401528051918291826060860152018484015e5f828201840152601f01601f19168101030190f35b634e487b7160e01b5f52604160045260245ffd5b9091505f5260205f205f905b8282106103225750602091508301018380610281565b600181602092548385890101520191019061030c565b9150506020925060ff191682850152151560051b8301018380610281565b60405162461bcd60e51b815260206004820152601060248201526f109b1bd8dace881b9bdd08199bdd5b9960821b6044820152606490fd5b50600154811115610237565b6040810190811067ffffffffffffffff8211176102ec57604052565b90600182811c921680156103e4575b60208310146103d057565b634e487b7160e01b5f52602260045260245ffd5b91607f16916103c556fea264697066735822122041bac8483b0d95b76110a7047aee2216987e6b3ee04e3620f25643ce6c0b130e64736f6c634300081c0033

Deployed ByteCode

0x6080806040526004361015610012575f80fd5b5f3560e01c90816304c0756914610207575080632681933a1461005e5763cc0bd62e1461003d575f80fd5b3461005a575f36600319011261005a576020600154604051908152f35b5f80fd5b3461005a57602036600319011261005a5760043567ffffffffffffffff811161005a573660238201121561005a5780600401359067ffffffffffffffff821161005a57366024838301011161005a576001545f1981146101f35760010180600155805f525f60205260405f206100d481546103b6565b93601f85116101ae575b602094505f601f821160011461014857819293945f9261013a575b50508160011b915f199060031b1c19161790555b60405190807f0b567c98c5fa582378ba6f26ceafdae463e045760cc7aa63e74068b24b57c85f5f80a28152f35b6024925001013585806100f9565b601f19821694835f52865f20915f5b878110610194575083600195969710610178575b505050811b01905561010d565b01602401355f19600384901b60f8161c1916905585808061016b565b909288600181926024878701013581550194019101610157565b815f5260205f20601f820160051c810195602083106101e9575b601f0160051c01945b8581106101de57506100de565b5f81556001016101d1565b90955085906101c8565b634e487b7160e01b5f52601160045260245ffd5b3461005a57602036600319011261005a5760606020600435926102298161039a565b5f815201528015158061038e575b1561035657805f525f60205260405f2090604051906102558261039a565b8152604051915f90805490610269826103b6565b80865291600181169081156103385750600114610300575b5050829003601f01601f191682019067ffffffffffffffff8211838310176102ec576080916040526020810192835260206040519384928284525182840152516040808401528051918291826060860152018484015e5f828201840152601f01601f19168101030190f35b634e487b7160e01b5f52604160045260245ffd5b9091505f5260205f205f905b8282106103225750602091508301018380610281565b600181602092548385890101520191019061030c565b9150506020925060ff191682850152151560051b8301018380610281565b60405162461bcd60e51b815260206004820152601060248201526f109b1bd8dace881b9bdd08199bdd5b9960821b6044820152606490fd5b50600154811115610237565b6040810190811067ffffffffffffffff8211176102ec57604052565b90600182811c921680156103e4575b60208310146103d057565b634e487b7160e01b5f52602260045260245ffd5b91607f16916103c556fea264697066735822122041bac8483b0d95b76110a7047aee2216987e6b3ee04e3620f25643ce6c0b130e64736f6c634300081c0033