ETH Price: $3,980.53 (-0.40%)
Gas: 0.18 GWei

Contract

0xf2f22404aD245e909173189bd3B35E5F153548fF

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Configure111981502024-10-25 12:02:5744 days ago1729857777IN
0xf2f22404...F153548fF
0 ETH0.000103170.17217437

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

Contract Source Code Verified (Exact Match)

Contract Name:
VerifierMetadata

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 1 : VerifierMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
 
/// @title VerifierMetadata
/// @author clowes.eth, for Unruggable
//
// This contract contains chain specific metadata for this chain.
// This data is trustlessly resolved by a chain specific subname of verifier.unruggable.eth on L1.
// It is used as a demonstration of trustless resolution of data from L2 to L1 in the context of our Unruggable Gateways solution.

contract VerifierMetadata {

    event VerifierChanged(address a);
    event TextChanged(string key, string value);

    struct KeyValue {
        string key;
        string value;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Only the contract owner can call this function.");
        _;
    }

    address public owner; // Slot 0

    // This is the address for this chain's verifier contract on Layer 1 Ethereum
    address public verifierAddress; // Slot 1

    // This is a mapping of text records for Layer 1 Ethereum
    mapping(string => string) public texts; // Slot 2

    constructor() {
        owner = msg.sender;
    }

    function configure(address _verifierAddress, KeyValue[] memory _texts) public onlyOwner {
        if (_verifierAddress != verifierAddress) {
            verifierAddress = _verifierAddress;
            emit VerifierChanged(_verifierAddress);
        }

        for (uint i = 0; i < _texts.length; i++) {
            if (keccak256(bytes(texts[_texts[i].key])) != keccak256(bytes(_texts[i].value))) {
                texts[_texts[i].key] = _texts[i].value;
                emit TextChanged(_texts[i].key, _texts[i].value);
            }
        }
    }
}

Settings
{
  "remappings": [
    "@unruggable/=lib/unruggable-gateways/",
    "@eth-optimism/=lib/unruggable-gateways/lib/optimism/packages/",
    "@openzeppelin/contracts/=lib/unruggable-gateways/lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/unruggable-gateways/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/unruggable-gateways/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/unruggable-gateways/lib/forge-std/src/",
    "openzeppelin-contracts/=lib/unruggable-gateways/lib/openzeppelin-contracts/",
    "optimism/=lib/unruggable-gateways/lib/optimism/packages/contracts-bedrock/src/",
    "unruggable-gateways/=lib/unruggable-gateways/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"a","type":"address"}],"name":"VerifierChanged","type":"event"},{"inputs":[{"internalType":"address","name":"_verifierAddress","type":"address"},{"components":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct VerifierMetadata.KeyValue[]","name":"_texts","type":"tuple[]"}],"name":"configure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"texts","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifierAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052348015600f57600080fd5b50600080546001600160a01b031916331790556108cf806100316000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806318bdffbb146100515780632a8f25e1146100815780638da5cb5b14610096578063ed0fe4d4146100a9575b600080fd5b600154610064906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009461008f366004610494565b6100c9565b005b600054610064906001600160a01b031681565b6100bc6100b73660046105d2565b61030f565b604051610078919061065f565b6000546001600160a01b0316331461013f5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e65722063616e2063616c6c60448201526e103a3434b990333ab731ba34b7b71760891b606482015260840160405180910390fd5b6001546001600160a01b038381169116146101a557600180546001600160a01b0319166001600160a01b0384169081179091556040519081527eaccbf0787bf565863b49aef6d6d8ff2f631f1da95c76e016aed7a21a11a7b79060200160405180910390a15b60005b815181101561030a578181815181106101c3576101c3610679565b6020026020010151602001518051906020012060028383815181106101ea576101ea610679565b602002602001015160000151604051610203919061068f565b90815260405190819003602001812061021b916106e5565b6040518091039020146103025781818151811061023a5761023a610679565b602002602001015160200151600283838151811061025a5761025a610679565b602002602001015160000151604051610273919061068f565b9081526020016040518091039020908161028d91906107ab565b507f554d89a3abec2d5a1a0002f9143a49bf84166f03eac8aed5f53780e7c66773ec8282815181106102c1576102c1610679565b6020026020010151600001518383815181106102df576102df610679565b6020026020010151602001516040516102f992919061086b565b60405180910390a15b6001016101a8565b505050565b805160208183018101805160028252928201919093012091528054610333906106ab565b80601f016020809104026020016040519081016040528092919081815260200182805461035f906106ab565b80156103ac5780601f10610381576101008083540402835291602001916103ac565b820191906000526020600020905b81548152906001019060200180831161038f57829003601f168201915b505050505081565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156103ed576103ed6103b4565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561041c5761041c6103b4565b604052919050565b600082601f83011261043557600080fd5b813567ffffffffffffffff81111561044f5761044f6103b4565b610462601f8201601f19166020016103f3565b81815284602083860101111561047757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408084860312156104a857600080fd5b83356001600160a01b03811681146104bf57600080fd5b925060208481013567ffffffffffffffff808211156104dd57600080fd5b818701915087601f8301126104f157600080fd5b813581811115610503576105036103b4565b8060051b6105128582016103f3565b918252838101850191858101908b84111561052c57600080fd5b86860192505b838310156105c05782358581111561054a5760008081fd5b8601808d03601f19018913156105605760008081fd5b6105686103ca565b888201358781111561057a5760008081fd5b6105888f8b83860101610424565b825250898201358781111561059d5760008081fd5b6105ab8f8b83860101610424565b828b0152508352509186019190860190610532565b80985050505050505050509250929050565b6000602082840312156105e457600080fd5b813567ffffffffffffffff8111156105fb57600080fd5b61060784828501610424565b949350505050565b60005b8381101561062a578181015183820152602001610612565b50506000910152565b6000815180845261064b81602086016020860161060f565b601f01601f19169290920160200192915050565b6020815260006106726020830184610633565b9392505050565b634e487b7160e01b600052603260045260246000fd5b600082516106a181846020870161060f565b9190910192915050565b600181811c908216806106bf57607f821691505b6020821081036106df57634e487b7160e01b600052602260045260246000fd5b50919050565b60008083546106f3816106ab565b6001828116801561070b57600181146107205761074f565b60ff198416875282151583028701945061074f565b8760005260208060002060005b858110156107465781548a82015290840190820161072d565b50505082870194505b50929695505050505050565b601f82111561030a576000816000526020600020601f850160051c810160208610156107845750805b601f850160051c820191505b818110156107a357828155600101610790565b505050505050565b815167ffffffffffffffff8111156107c5576107c56103b4565b6107d9816107d384546106ab565b8461075b565b602080601f83116001811461080e57600084156107f65750858301515b600019600386901b1c1916600185901b1785556107a3565b600085815260208120601f198616915b8281101561083d5788860151825594840194600190910190840161081e565b508582101561085b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600061087e6040830185610633565b82810360208401526108908185610633565b9594505050505056fea264697066735822122089c989a11416cb2bfc8c7850c8c19479fcebc7d0eea8ac938816ad8a72369d6b64736f6c63430008190033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806318bdffbb146100515780632a8f25e1146100815780638da5cb5b14610096578063ed0fe4d4146100a9575b600080fd5b600154610064906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61009461008f366004610494565b6100c9565b005b600054610064906001600160a01b031681565b6100bc6100b73660046105d2565b61030f565b604051610078919061065f565b6000546001600160a01b0316331461013f5760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e65722063616e2063616c6c60448201526e103a3434b990333ab731ba34b7b71760891b606482015260840160405180910390fd5b6001546001600160a01b038381169116146101a557600180546001600160a01b0319166001600160a01b0384169081179091556040519081527eaccbf0787bf565863b49aef6d6d8ff2f631f1da95c76e016aed7a21a11a7b79060200160405180910390a15b60005b815181101561030a578181815181106101c3576101c3610679565b6020026020010151602001518051906020012060028383815181106101ea576101ea610679565b602002602001015160000151604051610203919061068f565b90815260405190819003602001812061021b916106e5565b6040518091039020146103025781818151811061023a5761023a610679565b602002602001015160200151600283838151811061025a5761025a610679565b602002602001015160000151604051610273919061068f565b9081526020016040518091039020908161028d91906107ab565b507f554d89a3abec2d5a1a0002f9143a49bf84166f03eac8aed5f53780e7c66773ec8282815181106102c1576102c1610679565b6020026020010151600001518383815181106102df576102df610679565b6020026020010151602001516040516102f992919061086b565b60405180910390a15b6001016101a8565b505050565b805160208183018101805160028252928201919093012091528054610333906106ab565b80601f016020809104026020016040519081016040528092919081815260200182805461035f906106ab565b80156103ac5780601f10610381576101008083540402835291602001916103ac565b820191906000526020600020905b81548152906001019060200180831161038f57829003601f168201915b505050505081565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156103ed576103ed6103b4565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561041c5761041c6103b4565b604052919050565b600082601f83011261043557600080fd5b813567ffffffffffffffff81111561044f5761044f6103b4565b610462601f8201601f19166020016103f3565b81815284602083860101111561047757600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408084860312156104a857600080fd5b83356001600160a01b03811681146104bf57600080fd5b925060208481013567ffffffffffffffff808211156104dd57600080fd5b818701915087601f8301126104f157600080fd5b813581811115610503576105036103b4565b8060051b6105128582016103f3565b918252838101850191858101908b84111561052c57600080fd5b86860192505b838310156105c05782358581111561054a5760008081fd5b8601808d03601f19018913156105605760008081fd5b6105686103ca565b888201358781111561057a5760008081fd5b6105888f8b83860101610424565b825250898201358781111561059d5760008081fd5b6105ab8f8b83860101610424565b828b0152508352509186019190860190610532565b80985050505050505050509250929050565b6000602082840312156105e457600080fd5b813567ffffffffffffffff8111156105fb57600080fd5b61060784828501610424565b949350505050565b60005b8381101561062a578181015183820152602001610612565b50506000910152565b6000815180845261064b81602086016020860161060f565b601f01601f19169290920160200192915050565b6020815260006106726020830184610633565b9392505050565b634e487b7160e01b600052603260045260246000fd5b600082516106a181846020870161060f565b9190910192915050565b600181811c908216806106bf57607f821691505b6020821081036106df57634e487b7160e01b600052602260045260246000fd5b50919050565b60008083546106f3816106ab565b6001828116801561070b57600181146107205761074f565b60ff198416875282151583028701945061074f565b8760005260208060002060005b858110156107465781548a82015290840190820161072d565b50505082870194505b50929695505050505050565b601f82111561030a576000816000526020600020601f850160051c810160208610156107845750805b601f850160051c820191505b818110156107a357828155600101610790565b505050505050565b815167ffffffffffffffff8111156107c5576107c56103b4565b6107d9816107d384546106ab565b8461075b565b602080601f83116001811461080e57600084156107f65750858301515b600019600386901b1c1916600185901b1785556107a3565b600085815260208120601f198616915b8281101561083d5788860151825594840194600190910190840161081e565b508582101561085b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60408152600061087e6040830185610633565b82810360208401526108908185610633565b9594505050505056fea264697066735822122089c989a11416cb2bfc8c7850c8c19479fcebc7d0eea8ac938816ad8a72369d6b64736f6c63430008190033

Block Transaction Gas Used Reward
view all blocks sequenced

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
[ 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.