false
false
0
The new Blockscout UI is now open source! Learn how to deploy it here

Contract Address Details

0xCef6b3F9b417E4179B467C0a4703F87e7714A848

Contract Name
DevnetVerifier
Creator
0x4779d1–4df7b8 at 0xfdc019–5bcc68
Balance
0 ETH
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
3609
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
DevnetVerifier




Optimization enabled
true
Compiler version
v0.8.30+commit.73712a01




Optimization runs
200
EVM Version
prague




Verified at
2025-12-15T12:41:47.046565Z

Constructor Arguments

0x000000000000000000000000ef8ae6522678e44c0ee299d0835238ce5cb8c03600000000000000000000000000a9f4767a69ca3c219854ca1bfd5440930b2bed0000000000000000000000006b455442c8c4cac2e09c40409e8bf7ffcdb1fc5000000000000000000000000000f9f60c79e38c08b785ee4f1a849900693c6630

Arg [0] (address) : 0xef8ae6522678e44c0ee299d0835238ce5cb8c036
Arg [1] (address) : 0x00a9f4767a69ca3c219854ca1bfd5440930b2bed
Arg [2] (address) : 0x6b455442c8c4cac2e09c40409e8bf7ffcdb1fc50
Arg [3] (address) : 0x00f9f60c79e38c08b785ee4f1a849900693c6630

              

contracts/layer1/devnet/DevnetVerifier.sol

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

import "../verifiers/compose/ComposeVerifier.sol";

/// @title DevnetVerifier
/// @notice SGX + (OP or RISC0 or SP1) verifier for devnet
/// @dev In production, use AnyTwoVerifier. This is for testing with OpVerifier support.
/// @custom:security-contact security@taiko.xyz
contract DevnetVerifier is ComposeVerifier {
    constructor(
        address _sgxGethVerifier,
        address _sgxRethVerifier,
        address _risc0RethVerifier,
        address _sp1RethVerifier
    )
        ComposeVerifier(
            _sgxGethVerifier,
            address(0),
            address(0),
            _sgxRethVerifier,
            _risc0RethVerifier,
            _sp1RethVerifier
        )
    { }

    /// @notice Check if the provided verifiers are sufficient
    /// @dev Requires exactly 2 verifiers: SGX + (OP or RISC0 or SP1)
    function areVerifiersSufficient(address[] memory _verifiers)
        internal
        view
        override
        returns (bool)
    {
        if (_verifiers.length != 2) return false;

        // Determine which verifier is SGX and which is the second verifier
        uint256 secondVerifierIdx;
        if (_verifiers[0] == sgxGethVerifier) {
            secondVerifierIdx = 1;
        } else if (_verifiers[1] == sgxGethVerifier) {
            secondVerifierIdx = 0;
        } else {
            // One of the verifiers MUST be SGX
            return false;
        }

        // The second verifier must be one of: OP, RISC0, or SP1
        return _verifiers[secondVerifierIdx] == sgxRethVerifier
            || _verifiers[secondVerifierIdx] == risc0RethVerifier
            || _verifiers[secondVerifierIdx] == sp1RethVerifier;
    }
}
        

contracts/layer1/verifiers/IProofVerifier.sol

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

/// @title IProofVerifier
/// @notice Interface for verifying validity proofs for state transitions
/// @custom:security-contact security@taiko.xyz
interface IProofVerifier {
    /// @notice Verifies a validity proof for a state transition
    /// @dev This function must revert if the proof is invalid
    /// @param _proposalAge The age in seconds of the proposal being proven. Only set for
    ///        single-proposal proofs (calculated as block.timestamp - proposal.timestamp).
    ///        For multi-proposal batches, this is always 0, meaning "not applicable".
    ///        Verifiers should interpret _proposalAge == 0 as "not applicable" rather than
    ///        "instant proof". This parameter enables age-based verification logic, such as
    ///        detecting and handling prover-killer proposals differently.
    /// @param _commitmentHash Hash of the last proposal hash and commitment data
    /// @param _proof The proof data
    function verifyProof(
        uint256 _proposalAge,
        bytes32 _commitmentHash,
        bytes calldata _proof
    )
        external
        view;
}
          

contracts/layer1/verifiers/compose/ComposeVerifier.sol

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

import "../IProofVerifier.sol";

/// @title ComposeVerifier
/// @notice This contract is an abstract verifier that composes multiple sub-verifiers to validate
/// proofs.
/// It ensures that a set of sub-proofs are verified by their respective verifiers before
/// considering the overall proof as valid.
/// @custom:security-contact security@taiko.xyz
abstract contract ComposeVerifier is IProofVerifier {
    struct SubProof {
        uint8 verifierId;
        bytes proof;
    }

    /// @notice Enum for verifier identification using stable IDs
    uint8 public constant NONE = 0;
    uint8 public constant SGX_GETH = 1;
    uint8 public constant TDX_GETH = 2;
    uint8 public constant OP = 3;
    uint8 public constant SGX_RETH = 4;
    uint8 public constant RISC0_RETH = 5;
    uint8 public constant SP1_RETH = 6;

    /// @notice Immutable verifier addresses
    /// The sgx/tdx-GethVerifier is the core verifier required in every proof.
    /// All other proofs share its status root, despite different public inputs
    /// due to different verification types.
    /// proofs come from geth client
    address public immutable sgxGethVerifier;
    address public immutable tdxGethVerifier;
    /// op for test purpose
    address public immutable opVerifier;
    /// proofs come from reth client
    address public immutable sgxRethVerifier;
    address public immutable risc0RethVerifier;
    address public immutable sp1RethVerifier;

    constructor(
        address _sgxGethVerifier,
        address _tdxGethVerifier,
        address _opVerifier,
        address _sgxRethVerifier,
        address _risc0RethVerifier,
        address _sp1RethVerifier
    ) {
        sgxGethVerifier = _sgxGethVerifier;
        tdxGethVerifier = _tdxGethVerifier;
        opVerifier = _opVerifier;
        sgxRethVerifier = _sgxRethVerifier;
        risc0RethVerifier = _risc0RethVerifier;
        sp1RethVerifier = _sp1RethVerifier;
    }

    /// @inheritdoc IProofVerifier
    function verifyProof(
        uint256 _proposalAge,
        bytes32 _commitmentHash,
        bytes calldata _proof
    )
        external
        view
    {
        SubProof[] memory subProofs = abi.decode(_proof, (SubProof[]));
        uint256 size = subProofs.length;
        address[] memory verifiers = new address[](size);

        uint8 lastVerifierId;

        for (uint256 i; i < size; ++i) {
            uint8 verifierId = subProofs[i].verifierId;

            require(verifierId != NONE, CV_INVALID_SUB_VERIFIER());
            require(verifierId > lastVerifierId, CV_INVALID_SUB_VERIFIER_ORDER());

            address verifier = getVerifierAddress(verifierId);
            require(verifier != address(0), CV_INVALID_SUB_VERIFIER());

            IProofVerifier(verifier).verifyProof(_proposalAge, _commitmentHash, subProofs[i].proof);

            verifiers[i] = verifier;
            lastVerifierId = verifierId;
        }

        require(areVerifiersSufficient(verifiers), CV_VERIFIERS_INSUFFICIENT());
    }

    /// @notice Returns the verifier address for a given verifier ID
    /// @param _verifierId The verifier ID to query
    /// @return The address of the verifier (or address(0) if invalid)
    function getVerifierAddress(uint8 _verifierId) public view returns (address) {
        if (_verifierId == SGX_GETH) return sgxGethVerifier;
        if (_verifierId == TDX_GETH) return tdxGethVerifier;
        if (_verifierId == OP) return opVerifier;
        if (_verifierId == SGX_RETH) return sgxRethVerifier;
        if (_verifierId == RISC0_RETH) return risc0RethVerifier;
        if (_verifierId == SP1_RETH) return sp1RethVerifier;
        return address(0);
    }

    /// @dev Checks if the provided verifiers are sufficient
    /// NOTE: Verifier addresses are provided in ascending order of their IDs
    function areVerifiersSufficient(address[] memory _verifiers)
        internal
        view
        virtual
        returns (bool);

    error CV_INVALID_SUB_VERIFIER();
    error CV_INVALID_SUB_VERIFIER_ORDER();
    error CV_VERIFIERS_INSUFFICIENT();
}
          

Compiler Settings

{"viaIR":true,"remappings":["openzeppelin/=node_modules/@openzeppelin/","@openzeppelin/=node_modules/@openzeppelin/","@openzeppelin-upgrades/contracts/=node_modules/@openzeppelin/contracts-upgradeable/","@risc0/contracts/=node_modules/risc0-ethereum/contracts/src/","@solady/=node_modules/solady/","solady/src/=node_modules/solady/src/","solady/utils/=node_modules/solady/src/utils/","@optimism/=node_modules/optimism/","@sp1-contracts/=node_modules/sp1-contracts/contracts/","forge-std/=node_modules/forge-std/","@p256-verifier/contracts/=node_modules/p256-verifier/src/","@eth-fabric/urc/=node_modules/urc/src/","ds-test/=node_modules/ds-test/","src/=contracts/","test/=test/","script/=script/","optimism/=node_modules/optimism/","p256-verifier/=node_modules/p256-verifier/","risc0-ethereum/=node_modules/risc0-ethereum/","sp1-contracts/=node_modules/sp1-contracts/","urc/=node_modules/urc/"],"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"libraries":{"contracts/layer1/core/libs/LibInboxSetup.sol":{"LibInboxSetup":"0xf88Ef5437749A225621101BE8C1BE1A0cE967758"},"contracts/layer1/core/libs/LibForcedInclusion.sol":{"LibForcedInclusion":"0xd1a27F331c17eD8Cbb6DAbce67A42d6b8a6B0e14"}},"evmVersion":"prague"}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_sgxGethVerifier","internalType":"address"},{"type":"address","name":"_sgxRethVerifier","internalType":"address"},{"type":"address","name":"_risc0RethVerifier","internalType":"address"},{"type":"address","name":"_sp1RethVerifier","internalType":"address"}]},{"type":"error","name":"CV_INVALID_SUB_VERIFIER","inputs":[]},{"type":"error","name":"CV_INVALID_SUB_VERIFIER_ORDER","inputs":[]},{"type":"error","name":"CV_VERIFIERS_INSUFFICIENT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"NONE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"OP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"RISC0_RETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"SGX_GETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"SGX_RETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"SP1_RETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"TDX_GETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getVerifierAddress","inputs":[{"type":"uint8","name":"_verifierId","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"opVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"risc0RethVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"sgxGethVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"sgxRethVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"sp1RethVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"tdxGethVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[],"name":"verifyProof","inputs":[{"type":"uint256","name":"_proposalAge","internalType":"uint256"},{"type":"bytes32","name":"_commitmentHash","internalType":"bytes32"},{"type":"bytes","name":"_proof","internalType":"bytes"}]}]
              

Contract Creation Code

Verify & Publish
0x6101403461011057601f610a9338819003918201601f19168301916001600160401b03831184841017610114578084926080946040528339810103126101105761004881610128565b9061005560208201610128565b61006d606061006660408501610128565b9301610128565b926080525f60a0525f60c05260e0526101005261012052604051610956908161013d82396080518181816102a3015281816107ac01526107ed015260a0518181816101360152610787015260c05181818160f20152610762015260e0518181816103220152818161073d01526108390152610100518181816101950152818161071801526108d00152610120518181816101f4015281816106f3015261088c0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101105756fe60806040526004361015610011575f80fd5b5f3560e01c806314bcf3dd146103515780634185d4221461030d57806342b57409146102d2578063680bca471461028e5780637c9c347214610273578063835253941461025957806389b2e1841461023e5780638a153cb3146102235780638d732463146101df57806393934956146101c457806397b56f5714610180578063995a034f14610165578063a936fa7114610121578063d09aed48146100dd5763deef3878146100be575f80fd5b346100d9575f3660031901126100d957602060405160028152f35b5f80fd5b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d9575f3660031901126100d957602060405160018152f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d9575f3660031901126100d957602060405160048152f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d9575f3660031901126100d957602060405160058152f35b346100d9575f3660031901126100d957602060405160068152f35b346100d9575f3660031901126100d95760206040515f8152f35b346100d9575f3660031901126100d957602060405160038152f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d95760203660031901126100d95760043560ff811681036100d9576102fb6020916106bb565b6040516001600160a01b039091168152f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d95760603660031901126100d95760243560443560043567ffffffffffffffff82116100d957366023830112156100d957816004013567ffffffffffffffff81116100d95782019160248301903682116100d9576020818503126100d95760248101359067ffffffffffffffff82116100d95701816043820112156100d9576024810135936103e28561067b565b946103f06040519687610659565b808652602060248188019260051b85010101928484116100d95760448101915b848310610571578888888151916104268361067b565b936104346040519586610659565b838552601f196104438561067b565b013660208701375f92835b8585106104745761045e876107ce565b1561046557005b634148652760e11b5f5260045ffd5b60ff6104808686610693565b5151169081156105535760ff16811115610562576001600160a01b036104a5826106bb565b169081156105535760206104b98787610693565b51015191803b156100d9575f6020936084604051809681936314bcf3dd60e01b83528960048401528a6024840152606060448401528051918291826064860152018484015e8181018301859052601f01601f19168101030181845afa92831561054857600193610538575b5061052f878a610693565b5294019361044e565b5f61054291610659565b89610524565b6040513d5f823e3d90fd5b632699817960e01b5f5260045ffd5b636d14c6cd60e01b5f5260045ffd5b823567ffffffffffffffff81116100d95782016024810191906040908603601f1901126100d957604051916040830183811067ffffffffffffffff82111761064557604052602081013560ff811681036100d9578352604081013567ffffffffffffffff81116100d95760209101019087601f830112156100d95781359267ffffffffffffffff841161064557604051610615601f8601601f191660200182610659565b84815289602086860101116100d9575f602086819782809801838601378301015283820152815201920191610410565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff82111761064557604052565b67ffffffffffffffff81116106455760051b60200190565b80518210156106a75760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b60ff16600181146107a95760028114610784576003811461075f576004811461073a5760058114610715576006146106f1575f90565b7f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000000000000000000000000000000000000000000090565b600281510361091b578051156106a75760208101516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911681036108f757506001905b6001600160a01b0361082d8383610693565b51166001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016149182156108b0575b821561086d57505090565b6001600160a01b03925061088091610693565b51166001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161490565b91506001600160a01b036108c48383610693565b51166001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161491610862565b8151600110156106a75760408201516001600160a01b03160361091b575f9061081b565b505f9056fea26469706673582212205d192518cb0d24f8592f3e5dd08765525982225f6ffa0cfd7ac955e1465ad4bf64736f6c634300081e0033000000000000000000000000ef8ae6522678e44c0ee299d0835238ce5cb8c03600000000000000000000000000a9f4767a69ca3c219854ca1bfd5440930b2bed0000000000000000000000006b455442c8c4cac2e09c40409e8bf7ffcdb1fc5000000000000000000000000000f9f60c79e38c08b785ee4f1a849900693c6630

Deployed ByteCode

0x60806040526004361015610011575f80fd5b5f3560e01c806314bcf3dd146103515780634185d4221461030d57806342b57409146102d2578063680bca471461028e5780637c9c347214610273578063835253941461025957806389b2e1841461023e5780638a153cb3146102235780638d732463146101df57806393934956146101c457806397b56f5714610180578063995a034f14610165578063a936fa7114610121578063d09aed48146100dd5763deef3878146100be575f80fd5b346100d9575f3660031901126100d957602060405160028152f35b5f80fd5b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346100d9575f3660031901126100d957602060405160018152f35b346100d9575f3660031901126100d9576040517f0000000000000000000000006b455442c8c4cac2e09c40409e8bf7ffcdb1fc506001600160a01b03168152602090f35b346100d9575f3660031901126100d957602060405160048152f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000f9f60c79e38c08b785ee4f1a849900693c66306001600160a01b03168152602090f35b346100d9575f3660031901126100d957602060405160058152f35b346100d9575f3660031901126100d957602060405160068152f35b346100d9575f3660031901126100d95760206040515f8152f35b346100d9575f3660031901126100d957602060405160038152f35b346100d9575f3660031901126100d9576040517f000000000000000000000000ef8ae6522678e44c0ee299d0835238ce5cb8c0366001600160a01b03168152602090f35b346100d95760203660031901126100d95760043560ff811681036100d9576102fb6020916106bb565b6040516001600160a01b039091168152f35b346100d9575f3660031901126100d9576040517f00000000000000000000000000a9f4767a69ca3c219854ca1bfd5440930b2bed6001600160a01b03168152602090f35b346100d95760603660031901126100d95760243560443560043567ffffffffffffffff82116100d957366023830112156100d957816004013567ffffffffffffffff81116100d95782019160248301903682116100d9576020818503126100d95760248101359067ffffffffffffffff82116100d95701816043820112156100d9576024810135936103e28561067b565b946103f06040519687610659565b808652602060248188019260051b85010101928484116100d95760448101915b848310610571578888888151916104268361067b565b936104346040519586610659565b838552601f196104438561067b565b013660208701375f92835b8585106104745761045e876107ce565b1561046557005b634148652760e11b5f5260045ffd5b60ff6104808686610693565b5151169081156105535760ff16811115610562576001600160a01b036104a5826106bb565b169081156105535760206104b98787610693565b51015191803b156100d9575f6020936084604051809681936314bcf3dd60e01b83528960048401528a6024840152606060448401528051918291826064860152018484015e8181018301859052601f01601f19168101030181845afa92831561054857600193610538575b5061052f878a610693565b5294019361044e565b5f61054291610659565b89610524565b6040513d5f823e3d90fd5b632699817960e01b5f5260045ffd5b636d14c6cd60e01b5f5260045ffd5b823567ffffffffffffffff81116100d95782016024810191906040908603601f1901126100d957604051916040830183811067ffffffffffffffff82111761064557604052602081013560ff811681036100d9578352604081013567ffffffffffffffff81116100d95760209101019087601f830112156100d95781359267ffffffffffffffff841161064557604051610615601f8601601f191660200182610659565b84815289602086860101116100d9575f602086819782809801838601378301015283820152815201920191610410565b634e487b7160e01b5f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff82111761064557604052565b67ffffffffffffffff81116106455760051b60200190565b80518210156106a75760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b60ff16600181146107a95760028114610784576003811461075f576004811461073a5760058114610715576006146106f1575f90565b7f00000000000000000000000000f9f60c79e38c08b785ee4f1a849900693c663090565b507f0000000000000000000000006b455442c8c4cac2e09c40409e8bf7ffcdb1fc5090565b507f00000000000000000000000000a9f4767a69ca3c219854ca1bfd5440930b2bed90565b507f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000000000000000000000000000000000000000000090565b507f000000000000000000000000ef8ae6522678e44c0ee299d0835238ce5cb8c03690565b600281510361091b578051156106a75760208101516001600160a01b037f000000000000000000000000ef8ae6522678e44c0ee299d0835238ce5cb8c0368116911681036108f757506001905b6001600160a01b0361082d8383610693565b51166001600160a01b037f00000000000000000000000000a9f4767a69ca3c219854ca1bfd5440930b2bed16149182156108b0575b821561086d57505090565b6001600160a01b03925061088091610693565b51166001600160a01b037f00000000000000000000000000f9f60c79e38c08b785ee4f1a849900693c6630161490565b91506001600160a01b036108c48383610693565b51166001600160a01b037f0000000000000000000000006b455442c8c4cac2e09c40409e8bf7ffcdb1fc50161491610862565b8151600110156106a75760408201516001600160a01b03160361091b575f9061081b565b505f9056fea26469706673582212205d192518cb0d24f8592f3e5dd08765525982225f6ffa0cfd7ac955e1465ad4bf64736f6c634300081e0033

External libraries