Sepolia Testnet

Contract

0x2EBc7B02d5b7555e4E47E7275150eF0aEb9AB122

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Store Hash67823392024-09-29 16:02:3668 days ago1727625756IN
0x2EBc7B02...aEb9AB122
0 ETH0.03421002203.84222787
Store Hash62509122024-07-05 12:55:36155 days ago1720184136IN
0x2EBc7B02...aEb9AB122
0 ETH0.0030766618.33245172
Store Hash62106352024-06-29 8:26:12161 days ago1719649572IN
0x2EBc7B02...aEb9AB122
0 ETH0.0048548128.92768652
Store Hash62062982024-06-28 17:11:36161 days ago1719594696IN
0x2EBc7B02...aEb9AB122
0 ETH0.0044921726.76683207
Store Hash62062392024-06-28 16:58:36161 days ago1719593916IN
0x2EBc7B02...aEb9AB122
0 ETH0.0043880926.14667212
Store Hash61941032024-06-26 23:51:36163 days ago1719445896IN
0x2EBc7B02...aEb9AB122
0 ETH0.003950510.50381423
Store Hash61938772024-06-26 23:06:24163 days ago1719443184IN
0x2EBc7B02...aEb9AB122
0 ETH0.007231470.7225962
Store Hash61938572024-06-26 23:02:24163 days ago1719442944IN
0x2EBc7B02...aEb9AB122
0 ETH0.000967550.7084464
Store Hash61937092024-06-26 22:32:48163 days ago1719441168IN
0x2EBc7B02...aEb9AB122
0 ETH0.017295251.39167037
Store Hash61932352024-06-26 20:58:00163 days ago1719435480IN
0x2EBc7B02...aEb9AB122
0 ETH0.003344590.64147792
Store Hash61931612024-06-26 20:43:12163 days ago1719434592IN
0x2EBc7B02...aEb9AB122
0 ETH0.002484191.47143838
Store Hash61931552024-06-26 20:42:00163 days ago1719434520IN
0x2EBc7B02...aEb9AB122
0 ETH0.002209721.56524318
Store Hash61931502024-06-26 20:41:00163 days ago1719434460IN
0x2EBc7B02...aEb9AB122
0 ETH0.001353281.71399934
Store Hash61931482024-06-26 20:40:36163 days ago1719434436IN
0x2EBc7B02...aEb9AB122
0 ETH0.000346911.62388375
Store Hash61928782024-06-26 19:46:36163 days ago1719431196IN
0x2EBc7B02...aEb9AB122
0 ETH0.003140544.22305373
Store Hash61927292024-06-26 19:16:48163 days ago1719429408IN
0x2EBc7B02...aEb9AB122
0 ETH0.051370664.52824124
Store Hash61927092024-06-26 19:12:48163 days ago1719429168IN
0x2EBc7B02...aEb9AB122
0 ETH0.00402864.95715974
Store Hash61926812024-06-26 19:07:12163 days ago1719428832IN
0x2EBc7B02...aEb9AB122
0 ETH0.013163844.71064805
Store Hash61926502024-06-26 19:01:00163 days ago1719428460IN
0x2EBc7B02...aEb9AB122
0 ETH0.054087213.90980645
Store Hash61924152024-06-26 18:14:00163 days ago1719425640IN
0x2EBc7B02...aEb9AB122
0 ETH0.0144051313.80944153
Store Hash61923442024-06-26 17:59:48163 days ago1719424788IN
0x2EBc7B02...aEb9AB122
0 ETH0.00852110.19695961
Store Hash61884582024-06-26 5:01:00164 days ago1719378060IN
0x2EBc7B02...aEb9AB122
0 ETH0.004722543.51681131
Store Hash61874992024-06-26 1:48:48164 days ago1719366528IN
0x2EBc7B02...aEb9AB122
0 ETH0.034156085.1596702
Store Hash61874942024-06-26 1:47:48164 days ago1719366468IN
0x2EBc7B02...aEb9AB122
0 ETH0.027450425.69244651
Store Hash61874872024-06-26 1:46:24164 days ago1719366384IN
0x2EBc7B02...aEb9AB122
0 ETH0.05624745.43287232
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:
HashStorage

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : HashStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/extension/ContractMetadata.sol";

contract HashStorage is ContractMetadata {
    struct HashData {
        string hash;
        string metadata;
    }

    address public owner;

    constructor() {
        owner = msg.sender;
    }

    mapping(uint256 => HashData) public hashData;
    uint256 public hashCount;

    event HashStored(uint256 indexed id, string hash, string metadata);

    function storeHash(string memory _hash, string memory _metadata) public {
        hashData[hashCount] = HashData(_hash, _metadata);
        emit HashStored(hashCount, _hash, _metadata);
        hashCount++;
    }


    function _canSetContractURI() internal view virtual override returns (bool){
        return msg.sender == owner;
    }
}

File 2 of 3 : ContractMetadata.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

import "./interface/IContractMetadata.sol";

/**
 *  @title   Contract Metadata
 *  @notice  Thirdweb's `ContractMetadata` is a contract extension for any base contracts. It lets you set a metadata URI
 *           for you contract.
 *           Additionally, `ContractMetadata` is necessary for NFT contracts that want royalties to get distributed on OpenSea.
 */

abstract contract ContractMetadata is IContractMetadata {
    /// @dev The sender is not authorized to perform the action
    error ContractMetadataUnauthorized();

    /// @notice Returns the contract metadata URI.
    string public override contractURI;

    /**
     *  @notice         Lets a contract admin set the URI for contract-level metadata.
     *  @dev            Caller should be authorized to setup contractURI, e.g. contract admin.
     *                  See {_canSetContractURI}.
     *                  Emits {ContractURIUpdated Event}.
     *
     *  @param _uri     keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
     */
    function setContractURI(string memory _uri) external override {
        if (!_canSetContractURI()) {
            revert ContractMetadataUnauthorized();
        }

        _setupContractURI(_uri);
    }

    /// @dev Lets a contract admin set the URI for contract-level metadata.
    function _setupContractURI(string memory _uri) internal {
        string memory prevURI = contractURI;
        contractURI = _uri;

        emit ContractURIUpdated(prevURI, _uri);
    }

    /// @dev Returns whether contract metadata can be set in the given execution context.
    function _canSetContractURI() internal view virtual returns (bool);
}

File 3 of 3 : IContractMetadata.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

/// @author thirdweb

/**
 *  Thirdweb's `ContractMetadata` is a contract extension for any base contracts. It lets you set a metadata URI
 *  for you contract.
 *
 *  Additionally, `ContractMetadata` is necessary for NFT contracts that want royalties to get distributed on OpenSea.
 */

interface IContractMetadata {
    /// @dev Returns the metadata URI of the contract.
    function contractURI() external view returns (string memory);

    /**
     *  @dev Sets contract URI for the storefront-level metadata of the contract.
     *       Only module admin can call this function.
     */
    function setContractURI(string calldata _uri) external;

    /// @dev Emitted when the contract URI is updated.
    event ContractURIUpdated(string prevURI, string newURI);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "remappings": [
    ":@thirdweb-dev/=node_modules/@thirdweb-dev/",
    ":forge-std/=lib/forge-std/src/"
  ],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ContractMetadataUnauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"prevURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"hash","type":"string"},{"indexed":false,"internalType":"string","name":"metadata","type":"string"}],"name":"HashStored","type":"event"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hashCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"hashData","outputs":[{"internalType":"string","name":"hash","type":"string"},{"internalType":"string","name":"metadata","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"},{"internalType":"string","name":"_metadata","type":"string"}],"name":"storeHash","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052348015600f57600080fd5b50600180546001600160a01b03191633179055610810806100316000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80635bebd9d7146100675780636f28ee09146100835780638da5cb5b14610098578063938e3d7b146100c35780639512182e146100d6578063e8a3d485146100f7575b600080fd5b61007060035481565b6040519081526020015b60405180910390f35b61009661009136600461051e565b61010c565b005b6001546100ab906001600160a01b031681565b6040516001600160a01b03909116815260200161007a565b6100966100d1366004610587565b6101ad565b6100e96100e43660046105c4565b6101e4565b60405161007a929190610623565b6100ff610310565b60405161007a9190610651565b604080518082018252838152602080820184905260035460009081526002909152919091208151819061013f90826106f4565b506020820151600182019061015490826106f4565b509050506003547f962fb7a924159dc0966b10da109020686f23e058ede690e3b46058d486099dee838360405161018c929190610623565b60405180910390a2600380549060006101a4836107b3565b91905055505050565b6001546001600160a01b031633146101d857604051639f7f092560e01b815260040160405180910390fd5b6101e18161039e565b50565b6002602052600090815260409020805481906101ff9061066b565b80601f016020809104026020016040519081016040528092919081815260200182805461022b9061066b565b80156102785780601f1061024d57610100808354040283529160200191610278565b820191906000526020600020905b81548152906001019060200180831161025b57829003601f168201915b50505050509080600101805461028d9061066b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b99061066b565b80156103065780601f106102db57610100808354040283529160200191610306565b820191906000526020600020905b8154815290600101906020018083116102e957829003601f168201915b5050505050905082565b6000805461031d9061066b565b80601f01602080910402602001604051908101604052809291908181526020018280546103499061066b565b80156103965780601f1061036b57610100808354040283529160200191610396565b820191906000526020600020905b81548152906001019060200180831161037957829003601f168201915b505050505081565b60008080546103ac9061066b565b80601f01602080910402602001604051908101604052809291908181526020018280546103d89061066b565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b50505050509050816000908161043b91906106f4565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a16818360405161046d929190610623565b60405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126104a057600080fd5b813567ffffffffffffffff8111156104ba576104ba610479565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156104e9576104e9610479565b60405281815283820160200185101561050157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561053157600080fd5b823567ffffffffffffffff81111561054857600080fd5b6105548582860161048f565b925050602083013567ffffffffffffffff81111561057157600080fd5b61057d8582860161048f565b9150509250929050565b60006020828403121561059957600080fd5b813567ffffffffffffffff8111156105b057600080fd5b6105bc8482850161048f565b949350505050565b6000602082840312156105d657600080fd5b5035919050565b6000815180845260005b81811015610603576020818501810151868301820152016105e7565b506000602082860101526020601f19601f83011685010191505092915050565b60408152600061063660408301856105dd565b828103602084015261064881856105dd565b95945050505050565b60208152600061066460208301846105dd565b9392505050565b600181811c9082168061067f57607f821691505b60208210810361069f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156106ef57806000526020600020601f840160051c810160208510156106cc5750805b601f840160051c820191505b818110156106ec57600081556001016106d8565b50505b505050565b815167ffffffffffffffff81111561070e5761070e610479565b6107228161071c845461066b565b846106a5565b6020601f821160018114610756576000831561073e5750848201515b600019600385901b1c1916600184901b1784556106ec565b600084815260208120601f198516915b828110156107865787850151825560209485019460019092019101610766565b50848210156107a45786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6000600182016107d357634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220dfa1c0c5927be5b28578bb539538b82b10bf868298c9c73698e5968a53ba1c4764736f6c634300081a0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c80635bebd9d7146100675780636f28ee09146100835780638da5cb5b14610098578063938e3d7b146100c35780639512182e146100d6578063e8a3d485146100f7575b600080fd5b61007060035481565b6040519081526020015b60405180910390f35b61009661009136600461051e565b61010c565b005b6001546100ab906001600160a01b031681565b6040516001600160a01b03909116815260200161007a565b6100966100d1366004610587565b6101ad565b6100e96100e43660046105c4565b6101e4565b60405161007a929190610623565b6100ff610310565b60405161007a9190610651565b604080518082018252838152602080820184905260035460009081526002909152919091208151819061013f90826106f4565b506020820151600182019061015490826106f4565b509050506003547f962fb7a924159dc0966b10da109020686f23e058ede690e3b46058d486099dee838360405161018c929190610623565b60405180910390a2600380549060006101a4836107b3565b91905055505050565b6001546001600160a01b031633146101d857604051639f7f092560e01b815260040160405180910390fd5b6101e18161039e565b50565b6002602052600090815260409020805481906101ff9061066b565b80601f016020809104026020016040519081016040528092919081815260200182805461022b9061066b565b80156102785780601f1061024d57610100808354040283529160200191610278565b820191906000526020600020905b81548152906001019060200180831161025b57829003601f168201915b50505050509080600101805461028d9061066b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b99061066b565b80156103065780601f106102db57610100808354040283529160200191610306565b820191906000526020600020905b8154815290600101906020018083116102e957829003601f168201915b5050505050905082565b6000805461031d9061066b565b80601f01602080910402602001604051908101604052809291908181526020018280546103499061066b565b80156103965780601f1061036b57610100808354040283529160200191610396565b820191906000526020600020905b81548152906001019060200180831161037957829003601f168201915b505050505081565b60008080546103ac9061066b565b80601f01602080910402602001604051908101604052809291908181526020018280546103d89061066b565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b50505050509050816000908161043b91906106f4565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a16818360405161046d929190610623565b60405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126104a057600080fd5b813567ffffffffffffffff8111156104ba576104ba610479565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156104e9576104e9610479565b60405281815283820160200185101561050157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561053157600080fd5b823567ffffffffffffffff81111561054857600080fd5b6105548582860161048f565b925050602083013567ffffffffffffffff81111561057157600080fd5b61057d8582860161048f565b9150509250929050565b60006020828403121561059957600080fd5b813567ffffffffffffffff8111156105b057600080fd5b6105bc8482850161048f565b949350505050565b6000602082840312156105d657600080fd5b5035919050565b6000815180845260005b81811015610603576020818501810151868301820152016105e7565b506000602082860101526020601f19601f83011685010191505092915050565b60408152600061063660408301856105dd565b828103602084015261064881856105dd565b95945050505050565b60208152600061066460208301846105dd565b9392505050565b600181811c9082168061067f57607f821691505b60208210810361069f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156106ef57806000526020600020601f840160051c810160208510156106cc5750805b601f840160051c820191505b818110156106ec57600081556001016106d8565b50505b505050565b815167ffffffffffffffff81111561070e5761070e610479565b6107228161071c845461066b565b846106a5565b6020601f821160018114610756576000831561073e5750848201515b600019600385901b1c1916600184901b1784556106ec565b600084815260208120601f198516915b828110156107865787850151825560209485019460019092019101610766565b50848210156107a45786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6000600182016107d357634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220dfa1c0c5927be5b28578bb539538b82b10bf868298c9c73698e5968a53ba1c4764736f6c634300081a0033

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

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