Sepolia Testnet

Contract

0x7bc4cC3B11180854f7440990b1DF7BB43C6135A9

Overview

ETH Balance

0 ETH

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Verify Proof41852542023-08-29 15:31:00464 days ago1693323060IN
0x7bc4cC3B...43C6135A9
0 ETH0.03208763136.25613216
Verify40645442023-08-10 23:49:36482 days ago1691711376IN
0x7bc4cC3B...43C6135A9
0 ETH0.00078853.21670074
Verify40645332023-08-10 23:47:12482 days ago1691711232IN
0x7bc4cC3B...43C6135A9
0 ETH0.000119163.18669526

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RiscZeroGroth16Verifier

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, GNU GPLv3 license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : RiscZeroGroth16Verifier.sol
// Copyright 2023 RISC Zero, Inc.
//
// The RiscZeroGroth16Verifier is a free software: you can redistribute it
// and/or modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// The RiscZeroGroth16Verifier is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
// Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// the RiscZeroGroth16Verifier. If not, see <https://www.gnu.org/licenses/>.
//
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.9;

import {SafeCast} from "openzeppelin/contracts/utils/math/SafeCast.sol";

import {Groth16Verifier} from "./Groth16Verifier.sol";
import {
    IRiscZeroVerifier,
    Receipt,
    ReceiptMetadata,
    ReceiptMetadataLib,
    ExitCode,
    SystemExitCode
} from "../IRiscZeroVerifier.sol";

/// @notice reverse the byte order of the uint256 value.
/// @dev Soldity uses a big-endian ABI encoding. Reversing the byte order before encoding
/// ensure that the encoded value will be little-endian.
/// Written by k06a. https://ethereum.stackexchange.com/a/83627
function reverseByteOrderUint256(uint256 input) pure returns (uint256 v) {
    v = input;

    // swap bytes
    v = ((v & 0xFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00) >> 8)
        | ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);

    // swap 2-byte long pairs
    v = ((v & 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >> 16)
        | ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);

    // swap 4-byte long pairs
    v = ((v & 0xFFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000) >> 32)
        | ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);

    // swap 8-byte long pairs
    v = ((v & 0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000) >> 64)
        | ((v & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);

    // swap 16-byte long pairs
    v = (v >> 128) | (v << 128);
}

/// @notice reverse the byte order of the uint32 value.
/// @dev Soldity uses a big-endian ABI encoding. Reversing the byte order before encoding
/// ensure that the encoded value will be little-endian.
/// Written by k06a. https://ethereum.stackexchange.com/a/83627
function reverseByteOrderUint32(uint32 input) pure returns (uint32 v) {
    v = input;

    // swap bytes
    v = ((v & 0xFF00FF00) >> 8) | ((v & 0x00FF00FF) << 8);

    // swap 2-byte long pairs
    v = (v >> 16) | (v << 16);
}

/// @notice A Groth16 seal over the claimed receipt metadata.
struct Seal {
    uint256[2] a;
    uint256[2][2] b;
    uint256[2] c;
}

contract RiscZeroGroth16Verifier is IRiscZeroVerifier, Groth16Verifier {
    using ReceiptMetadataLib for ReceiptMetadata;
    using SafeCast for uint256;

    // Control ID hash for the identity_p254 predicate decomposed as implemented by splitDigest.
    uint256 internal constant CONTROL_ID_0 = uint256(0x1eece9585d11a13832b205d334d97478);
    uint256 internal constant CONTROL_ID_1 = uint256(0x06b74fed6685c71e0cf31d881093df86);

    /// @notice splits a digest into two 128-bit words to use as public signal inputs.
    /// @dev RISC Zero's Circom verifier circuit takes each of two hash digests in two 128-bit
    /// chunks. These values can be derived from the digest by splitting the digest in half and
    /// then reversing the bytes of each.
    function splitDigest(bytes32 digest) internal pure returns (uint256, uint256) {
        uint256 reversed = reverseByteOrderUint256(uint256(digest));
        return (uint256(uint128(uint256(reversed))), uint256(reversed >> 128));
    }

    /// @notice verify that the given receipt is a valid Groth16 RISC Zero recursion receipt.
    /// @return true if the receipt passes the verification checks.
    function verify(Receipt memory receipt) public view returns (bool) {
        (uint256 meta0, uint256 meta1) = splitDigest(receipt.meta.digest());
        Seal memory seal = abi.decode(receipt.seal, (Seal));
        return this.verifyProof(seal.a, seal.b, seal.c, [CONTROL_ID_0, CONTROL_ID_1, meta0, meta1]);
    }

    /// @notice verifies that the given seal is a valid Groth16 RISC Zero proof of execution over the
    ///     given image ID, post-state digest, and journal hash. Asserts that the input hash
    //      is all-zeros (i.e. no committed input) and the exit code is (Halted, 0).
    /// @return true if the receipt passes the verification checks.
    function verify(bytes memory seal, bytes32 imageId, bytes32 postStateDigest, bytes32 journalHash)
        public
        view
        returns (bool)
    {
        Receipt memory receipt = Receipt(
            seal, ReceiptMetadata(imageId, postStateDigest, ExitCode(SystemExitCode.Halted, 0), bytes32(0), journalHash)
        );
        return verify(receipt);
    }

    /// @notice verifies that the given seal is a valid Groth16 RISC Zero proof of execution over the
    ///     given image ID, post-state digest, and full journal. Asserts that the input hash
    //      is all-zeros (i.e. no committed input) and the exit code is (Halted, 0).
    /// @return true if the receipt passes the verification checks.
    function verify(bytes memory seal, bytes32 imageId, bytes32 postStateDigest, bytes calldata journal)
        public
        view
        returns (bool)
    {
        return verify(seal, imageId, postStateDigest, sha256(journal));
    }
}

File 2 of 4 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     *
     * _Available since v4.7._
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits");
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     *
     * _Available since v4.7._
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits");
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     *
     * _Available since v4.7._
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits");
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     *
     * _Available since v4.2._
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     *
     * _Available since v4.7._
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits");
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     *
     * _Available since v4.7._
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits");
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     *
     * _Available since v4.7._
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits");
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     *
     * _Available since v4.7._
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits");
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     *
     * _Available since v4.7._
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits");
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     *
     * _Available since v4.7._
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits");
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     *
     * _Available since v4.7._
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits");
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     *
     * _Available since v4.7._
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits");
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     *
     * _Available since v4.7._
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits");
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     *
     * _Available since v4.7._
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits");
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     *
     * _Available since v4.7._
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits");
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v2.5._
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     *
     * _Available since v4.7._
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits");
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     *
     * _Available since v4.7._
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits");
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     *
     * _Available since v4.7._
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits");
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     *
     * _Available since v4.2._
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     *
     * _Available since v4.7._
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits");
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     *
     * _Available since v4.7._
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits");
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     *
     * _Available since v4.7._
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits");
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v2.5._
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     *
     * _Available since v4.7._
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits");
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     *
     * _Available since v4.7._
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits");
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     *
     * _Available since v4.7._
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits");
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v2.5._
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     *
     * _Available since v4.7._
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits");
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v2.5._
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     *
     * _Available since v2.5._
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     *
     * _Available since v3.0._
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     *
     * _Available since v4.7._
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 248 bits");
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     *
     * _Available since v4.7._
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 240 bits");
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     *
     * _Available since v4.7._
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 232 bits");
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     *
     * _Available since v4.7._
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 224 bits");
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     *
     * _Available since v4.7._
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 216 bits");
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     *
     * _Available since v4.7._
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 208 bits");
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     *
     * _Available since v4.7._
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 200 bits");
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     *
     * _Available since v4.7._
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 192 bits");
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     *
     * _Available since v4.7._
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 184 bits");
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     *
     * _Available since v4.7._
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 176 bits");
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     *
     * _Available since v4.7._
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 168 bits");
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     *
     * _Available since v4.7._
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 160 bits");
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     *
     * _Available since v4.7._
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 152 bits");
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     *
     * _Available since v4.7._
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 144 bits");
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     *
     * _Available since v4.7._
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 136 bits");
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 128 bits");
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     *
     * _Available since v4.7._
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 120 bits");
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     *
     * _Available since v4.7._
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 112 bits");
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     *
     * _Available since v4.7._
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 104 bits");
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     *
     * _Available since v4.7._
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 96 bits");
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     *
     * _Available since v4.7._
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 88 bits");
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     *
     * _Available since v4.7._
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 80 bits");
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     *
     * _Available since v4.7._
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 72 bits");
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 64 bits");
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     *
     * _Available since v4.7._
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 56 bits");
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     *
     * _Available since v4.7._
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 48 bits");
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     *
     * _Available since v4.7._
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 40 bits");
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 32 bits");
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     *
     * _Available since v4.7._
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 24 bits");
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 16 bits");
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 8 bits");
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     *
     * _Available since v3.0._
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

File 3 of 4 : Groth16Verifier.sol
// SPDX-License-Identifier: GPL-3.0
/*
    Copyright 2021 0KIMS association.

    This file is generated with [snarkJS](https://github.com/iden3/snarkjs).

    snarkJS is a free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    snarkJS is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
    License for more details.

    You should have received a copy of the GNU General Public License
    along with snarkJS. If not, see <https://www.gnu.org/licenses/>.
*/

pragma solidity >=0.7.0 <0.9.0;

contract Groth16Verifier {
    // Scalar field size
    uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
    // Base field size
    uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;

    // Verification Key data
    uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042;
    uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958;
    uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132;
    uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731;
    uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679;
    uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856;
    uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
    uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
    uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;
    uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;
    uint256 constant deltax1 = 18518940221910320856687047018635785128750837022059566906616608708313475199865;
    uint256 constant deltax2 = 9492326610711013918333865133991413442330971822743127449106067493230447878125;
    uint256 constant deltay1 = 19483644759748826533215810634368877792922012485854314246298395665859158607201;
    uint256 constant deltay2 = 21375251776817431660251933179512026180139877181625068362970095925425149918084;

    uint256 constant IC0x = 5283414572476013565779278723585415063371186194506872223482170607932178811733;
    uint256 constant IC0y = 18704069070102836155408936676819275373965966640372164023392964533091458933020;

    uint256 constant IC1x = 4204832149120840018317309580010992142700029278901617154852760187580780425598;
    uint256 constant IC1y = 12454324579480242399557363837918019584959512625719173397955145140913291575910;

    uint256 constant IC2x = 14956117485756386823219519866025248834283088288522682527835557402788427995664;
    uint256 constant IC2y = 6968527870554016879785099818512699922114301060378071349626144898778340839382;

    uint256 constant IC3x = 6512168907754184210144919576616764035747139382744482291187821746087116094329;
    uint256 constant IC3y = 17156131719875889332084290091263207055049222677188492681713268727972722760739;

    uint256 constant IC4x = 5195346330747727606774560791771406703229046454464300598774280139349802276261;
    uint256 constant IC4y = 16279160127031959334335024858510026085227931356896384961436876214395869945425;

    // Memory data
    uint16 constant pVk = 0;
    uint16 constant pPairing = 128;

    uint16 constant pLastMem = 896;

    function verifyProof(
        uint256[2] calldata _pA,
        uint256[2][2] calldata _pB,
        uint256[2] calldata _pC,
        uint256[4] calldata _pubSignals
    ) public view returns (bool) {
        assembly {
            function checkField(v) {
                if iszero(lt(v, q)) {
                    mstore(0, 0)
                    return(0, 0x20)
                }
            }

            // G1 function to multiply a G1 value(x,y) to value in an address
            function g1_mulAccC(pR, x, y, s) {
                let success
                let mIn := mload(0x40)
                mstore(mIn, x)
                mstore(add(mIn, 32), y)
                mstore(add(mIn, 64), s)

                success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64)

                if iszero(success) {
                    mstore(0, 0)
                    return(0, 0x20)
                }

                mstore(add(mIn, 64), mload(pR))
                mstore(add(mIn, 96), mload(add(pR, 32)))

                success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64)

                if iszero(success) {
                    mstore(0, 0)
                    return(0, 0x20)
                }
            }

            function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk {
                let _pPairing := add(pMem, pPairing)
                let _pVk := add(pMem, pVk)

                mstore(_pVk, IC0x)
                mstore(add(_pVk, 32), IC0y)

                // Compute the linear combination vk_x

                g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0)))

                g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32)))

                g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64)))

                g1_mulAccC(_pVk, IC4x, IC4y, calldataload(add(pubSignals, 96)))

                // -A
                mstore(_pPairing, calldataload(pA))
                mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q))

                // B
                mstore(add(_pPairing, 64), calldataload(pB))
                mstore(add(_pPairing, 96), calldataload(add(pB, 32)))
                mstore(add(_pPairing, 128), calldataload(add(pB, 64)))
                mstore(add(_pPairing, 160), calldataload(add(pB, 96)))

                // alpha1
                mstore(add(_pPairing, 192), alphax)
                mstore(add(_pPairing, 224), alphay)

                // beta2
                mstore(add(_pPairing, 256), betax1)
                mstore(add(_pPairing, 288), betax2)
                mstore(add(_pPairing, 320), betay1)
                mstore(add(_pPairing, 352), betay2)

                // vk_x
                mstore(add(_pPairing, 384), mload(add(pMem, pVk)))
                mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32))))

                // gamma2
                mstore(add(_pPairing, 448), gammax1)
                mstore(add(_pPairing, 480), gammax2)
                mstore(add(_pPairing, 512), gammay1)
                mstore(add(_pPairing, 544), gammay2)

                // C
                mstore(add(_pPairing, 576), calldataload(pC))
                mstore(add(_pPairing, 608), calldataload(add(pC, 32)))

                // delta2
                mstore(add(_pPairing, 640), deltax1)
                mstore(add(_pPairing, 672), deltax2)
                mstore(add(_pPairing, 704), deltay1)
                mstore(add(_pPairing, 736), deltay2)

                let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20)

                isOk := and(success, mload(_pPairing))
            }

            let pMem := mload(0x40)
            mstore(0x40, add(pMem, pLastMem))

            // Validate that all evaluations ∈ F

            checkField(calldataload(add(_pubSignals, 0)))

            checkField(calldataload(add(_pubSignals, 32)))

            checkField(calldataload(add(_pubSignals, 64)))

            checkField(calldataload(add(_pubSignals, 96)))

            checkField(calldataload(add(_pubSignals, 128)))

            // Validate all evaluations
            let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem)

            mstore(0, isValid)
            return(0, 0x20)
        }
    }
}

File 4 of 4 : IRiscZeroVerifier.sol
// Copyright 2023 RISC Zero, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.9;

/// @notice Indicator for the overall system at the end of execution covered by this proof.
enum SystemExitCode {
    Halted,
    Paused,
    SystemSplit
}

/// @notice Combination of system and user exit codes.
/// @dev If system exit code is SystemSplit, the user exit code must be zero.
struct ExitCode {
    SystemExitCode system;
    uint8 user;
}

/// @notice Data associated with a receipt which is used for both input and
/// output of global state.
struct ReceiptMetadata {
    /// Digest of the SystemState of a segment just before execution has begun.
    bytes32 preStateDigest;
    /// Digest of the SystemState of a segment just after execution has completed.
    bytes32 postStateDigest;
    /// The exit code for a segment
    ExitCode exitCode;
    /// A digest of the input, from the viewpoint of the guest.
    bytes32 input;
    /// A digest of the journal, from the viewpoint of the guest.
    bytes32 output;
}

library ReceiptMetadataLib {
    bytes32 constant TAG_DIGEST = sha256("risc0.ReceiptMeta");

    function digest(ReceiptMetadata memory meta) internal pure returns (bytes32) {
        return sha256(
            abi.encodePacked(
                TAG_DIGEST,
                // down
                meta.input,
                meta.preStateDigest,
                meta.postStateDigest,
                meta.output,
                // data
                uint32(meta.exitCode.system) << 24,
                uint32(meta.exitCode.user) << 24,
                // down.length
                uint16(4) << 8
            )
        );
    }
}

struct Receipt {
    bytes seal;
    ReceiptMetadata meta;
}

interface IRiscZeroVerifier {
    /// @notice verify that the given receipt is a valid Groth16 RISC Zero recursion receipt.
    /// @return true if the receipt passes the verification checks.
    function verify(Receipt calldata receipt) external view returns (bool);

    /// @notice verifies that the given seal is a valid Groth16 RISC Zero proof of execution over the
    ///     given image ID, post-state digest, and journal. Asserts that the input hash
    //      is all-zeros (i.e. no committed input) and the exit code is (Halted, 0).
    /// @return true if the receipt passes the verification checks.
    function verify(bytes calldata seal, bytes32 imageId, bytes32 postStateDigest, bytes32 journalHash)
        external
        view
        returns (bool);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "murky/=lib/murky/src/",
    "murky_differential_testing/=lib/murky/differential_testing/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/",
    "solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/",
    "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/",
    "lib/murky:ds-test/=lib/murky/lib/forge-std/lib/ds-test/src/",
    "lib/murky:forge-std/=lib/murky/lib/forge-std/src/",
    "lib/murky:openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/",
    "lib/openzeppelin-contracts:ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "lib/openzeppelin-contracts:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "lib/openzeppelin-contracts:forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
    "lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract ABI

[{"inputs":[{"components":[{"internalType":"bytes","name":"seal","type":"bytes"},{"components":[{"internalType":"bytes32","name":"preStateDigest","type":"bytes32"},{"internalType":"bytes32","name":"postStateDigest","type":"bytes32"},{"components":[{"internalType":"enum SystemExitCode","name":"system","type":"uint8"},{"internalType":"uint8","name":"user","type":"uint8"}],"internalType":"struct ExitCode","name":"exitCode","type":"tuple"},{"internalType":"bytes32","name":"input","type":"bytes32"},{"internalType":"bytes32","name":"output","type":"bytes32"}],"internalType":"struct ReceiptMetadata","name":"meta","type":"tuple"}],"internalType":"struct Receipt","name":"receipt","type":"tuple"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"seal","type":"bytes"},{"internalType":"bytes32","name":"imageId","type":"bytes32"},{"internalType":"bytes32","name":"postStateDigest","type":"bytes32"},{"internalType":"bytes","name":"journal","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"seal","type":"bytes"},{"internalType":"bytes32","name":"imageId","type":"bytes32"},{"internalType":"bytes32","name":"postStateDigest","type":"bytes32"},{"internalType":"bytes32","name":"journalHash","type":"bytes32"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"_pA","type":"uint256[2]"},{"internalType":"uint256[2][2]","name":"_pB","type":"uint256[2][2]"},{"internalType":"uint256[2]","name":"_pC","type":"uint256[2]"},{"internalType":"uint256[4]","name":"_pubSignals","type":"uint256[4]"}],"name":"verifyProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506110e6806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806304b18430146100515780631a36ed75146100785780635fe8c13b1461008b5780636efef0091461009e575b600080fd5b61006461005f366004610be1565b6100b1565b604051901515815260200160405180910390f35b610064610086366004610ce7565b6101b3565b610064610099366004610db1565b610217565b6100646100ac366004610e0b565b61078f565b60008060006100cb6100c685602001516107fd565b610960565b91509150600084600001518060200190518101906100e99190610eaf565b9050306001600160a01b0316635fe8c13b82600001518360200151846040015160405180608001604052806f1eece9585d11a13832b205d334d9747881526020016f06b74fed6685c71e0cf31d881093df868152602001898152602001888152506040518563ffffffff1660e01b81526004016101699493929190610f72565b602060405180830381865afa158015610186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101aa9190611019565b95945050505050565b600061020d868686600287876040516101cd929190611042565b602060405180830381855afa1580156101ea573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906100ac9190611052565b9695505050505050565b600061072a565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47811061024f576000805260206000f35b50565b600060405183815284602082015285604082015260408160608360076107d05a03fa915081610285576000805260206000f35b825160408201526020830151606082015260408360808360066107d05a03fa915050806102b6576000805260206000f35b5050505050565b7f0bae4e8249e16a7a60ccd0215fbe09b3850e8c18213acdb7f3e778e83909cb5585527f295a20c060882ebb89c0339f67c0659b89ab239bfa1239943d6e73841804e11c60208601526000608086018661035a87357f1b88e5dd5422d4c00bda2bc18bc9ac5aba22b30f81d6f6f68620226b984ac2667f094bd9c4b3869496bcf8ab0f733cc6b64243b5d408d09b701b16e7ddd124b17e84610252565b6103aa60208801357f0f680c08630f998c5fac176e593c8c7ee279105baff2d93aeaed5a5add0ccfd67f2110dccdaf8ae02a1da45b139c06df34536f19e6826d66879420751a419c1a1084610252565b6103fa60408801357f25ee06c4f9429471049948199b2973a538d9baff5425b52ce978bc88547ddc237f0e65c1c9ab69133c2e7399aa172eb5a89ccb7e7ba844a10f87c8cc729a0b3b7984610252565b61044a60608801357f23fdad98b64dbcbc1866faf6f7da3d769c91699bb729c94271dc428811d95e517f0b7c7639a64cb5505831eb09e75d41862c63b1f3ec55fc432a60b989eeaad5a584610252565b50823581527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760208401357f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4703066020820152833560408201526020840135606082015260408401356080820152606084013560a08201527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e260c08201527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d192660e08201527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c6101008201527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab6101208201527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a76101408201527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8610160820152600087015161018082015260206000018701516101a08201527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c26101c08201527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6101e08201527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b6102008201527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa610220820152843561024082015260208501356102608201527f28f15945c0d350dc79c3fa9aeae56a7c6f70a38baaa48bbda19531ac056433796102808201527f14fc776a7ce28afa94649f38f373a61f64ac984c02eee7eb8a36e68ac69edfed6102a08201527f2b135a25ce834c21818185f0779ddaf65f831d6cb941d74a6e8a10ce1b0e05616102c08201527f2f41f6b9a171433f2a2eaa0442b6cc89785eddcbd269e2a4386dbd91f6253b846102e08201526020816103008360086107d05a03fa9051169695505050505050565b6040516103808101604052610742600084013561021e565b61074f602084013561021e565b61075c604084013561021e565b610769606084013561021e565b610776608084013561021e565b610783818486888a6102bd565b90508060005260206000f35b60008060405180604001604052808781526020016040518060a001604052808881526020018781526020016040518060400160405280600060028111156107d8576107d861106b565b8152600060209182018190529183528201526040018690529052905061020d816100b1565b6000600280604051610826907072697363302e526563656970744d65746160781b815260110190565b602060405180830381855afa158015610843573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906108669190611052565b606084015184516020860151608087015160408801515160189060028111156108915761089161106b565b60408a810151602090810151825191820199909952908101969096526060860194909452608085019290925260a084015263ffffffff909116901b60e01b6001600160e01b03191660c082015260f89190911b6001600160f81b03191660c4820152600160fa1b60c882015260ca0160408051601f198184030181529082905261091a91611081565b602060405180830381855afa158015610937573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061095a9190611052565b92915050565b60008080610aad8460008190506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b6008827fff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0016901c1790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b6010827fffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff000016901c1790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b6020827fffffffff00000000ffffffff00000000ffffffff00000000ffffffff0000000016901c17905060408177ffffffffffffffff0000000000000000ffffffffffffffff16901b60408277ffffffffffffffff0000000000000000ffffffffffffffff1916901c179050608081901b608082901c179050919050565b6fffffffffffffffffffffffffffffffff81169560809190911c945092505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610b0857610b08610acf565b60405290565b60405160a0810167ffffffffffffffff81118282101715610b0857610b08610acf565b6040516060810167ffffffffffffffff81118282101715610b0857610b08610acf565b600082601f830112610b6557600080fd5b813567ffffffffffffffff80821115610b8057610b80610acf565b604051601f8301601f19908116603f01168101908282118183101715610ba857610ba8610acf565b81604052838152866020858801011115610bc157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610bf357600080fd5b813567ffffffffffffffff80821115610c0b57600080fd5b9083019081850360e0811215610c2057600080fd5b610c28610ae5565b833583811115610c3757600080fd5b610c4388828701610b54565b82525060c0601f1983011215610c5857600080fd5b610c60610b0e565b925060208401358352604084013560208401526040605f1983011215610c8557600080fd5b610c8d610ae5565b9150606084013560038110610ca157600080fd5b8252608084013560ff81168114610cb757600080fd5b602083810191909152604084019290925260a0840135606084015260c09093013560808301528201529392505050565b600080600080600060808688031215610cff57600080fd5b853567ffffffffffffffff80821115610d1757600080fd5b610d2389838a01610b54565b965060208801359550604088013594506060880135915080821115610d4757600080fd5b818801915088601f830112610d5b57600080fd5b813581811115610d6a57600080fd5b896020828501011115610d7c57600080fd5b9699959850939650602001949392505050565b806040810183101561095a57600080fd5b806080810183101561095a57600080fd5b6000806000806101808587031215610dc857600080fd5b610dd28686610d8f565b9350610de18660408701610da0565b9250610df08660c08701610d8f565b9150610e00866101008701610da0565b905092959194509250565b60008060008060808587031215610e2157600080fd5b843567ffffffffffffffff811115610e3857600080fd5b610e4487828801610b54565b97602087013597506040870135966060013595509350505050565b600082601f830112610e7057600080fd5b610e78610ae5565b806040840185811115610e8a57600080fd5b845b81811015610ea4578051845260209384019301610e8c565b509095945050505050565b60006101008284031215610ec257600080fd5b610eca610b31565b610ed48484610e5f565b8152604084605f850112610ee757600080fd5b610eef610ae5565b8060c0860187811115610f0157600080fd5b8387015b81811015610f2657610f178982610e5f565b84526020909301928401610f05565b50816020860152610f378882610e5f565b84860152505050508091505092915050565b8060005b6002811015610f6c578151845260209384019390910190600101610f4d565b50505050565b6101808101610f818287610f49565b60408083018660005b6002808210610f995750610fd4565b82518460005b83811015610fbd578251825260209283019290910190600101610f9f565b505050928401925060209190910190600101610f8a565b50505050610fe560c0830185610f49565b61010082018360005b600481101561100d578151835260209283019290910190600101610fee565b50505095945050505050565b60006020828403121561102b57600080fd5b8151801515811461103b57600080fd5b9392505050565b8183823760009101908152919050565b60006020828403121561106457600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b6000825160005b818110156110a25760208186018101518583015201611088565b50600092019182525091905056fea26469706673582212200cde923866632e8f7a5048b7a3ec8f0b09dcc97a212b8fe7669f23f7b2f005eb64736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806304b18430146100515780631a36ed75146100785780635fe8c13b1461008b5780636efef0091461009e575b600080fd5b61006461005f366004610be1565b6100b1565b604051901515815260200160405180910390f35b610064610086366004610ce7565b6101b3565b610064610099366004610db1565b610217565b6100646100ac366004610e0b565b61078f565b60008060006100cb6100c685602001516107fd565b610960565b91509150600084600001518060200190518101906100e99190610eaf565b9050306001600160a01b0316635fe8c13b82600001518360200151846040015160405180608001604052806f1eece9585d11a13832b205d334d9747881526020016f06b74fed6685c71e0cf31d881093df868152602001898152602001888152506040518563ffffffff1660e01b81526004016101699493929190610f72565b602060405180830381865afa158015610186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101aa9190611019565b95945050505050565b600061020d868686600287876040516101cd929190611042565b602060405180830381855afa1580156101ea573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906100ac9190611052565b9695505050505050565b600061072a565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47811061024f576000805260206000f35b50565b600060405183815284602082015285604082015260408160608360076107d05a03fa915081610285576000805260206000f35b825160408201526020830151606082015260408360808360066107d05a03fa915050806102b6576000805260206000f35b5050505050565b7f0bae4e8249e16a7a60ccd0215fbe09b3850e8c18213acdb7f3e778e83909cb5585527f295a20c060882ebb89c0339f67c0659b89ab239bfa1239943d6e73841804e11c60208601526000608086018661035a87357f1b88e5dd5422d4c00bda2bc18bc9ac5aba22b30f81d6f6f68620226b984ac2667f094bd9c4b3869496bcf8ab0f733cc6b64243b5d408d09b701b16e7ddd124b17e84610252565b6103aa60208801357f0f680c08630f998c5fac176e593c8c7ee279105baff2d93aeaed5a5add0ccfd67f2110dccdaf8ae02a1da45b139c06df34536f19e6826d66879420751a419c1a1084610252565b6103fa60408801357f25ee06c4f9429471049948199b2973a538d9baff5425b52ce978bc88547ddc237f0e65c1c9ab69133c2e7399aa172eb5a89ccb7e7ba844a10f87c8cc729a0b3b7984610252565b61044a60608801357f23fdad98b64dbcbc1866faf6f7da3d769c91699bb729c94271dc428811d95e517f0b7c7639a64cb5505831eb09e75d41862c63b1f3ec55fc432a60b989eeaad5a584610252565b50823581527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760208401357f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4703066020820152833560408201526020840135606082015260408401356080820152606084013560a08201527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e260c08201527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d192660e08201527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c6101008201527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab6101208201527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a76101408201527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8610160820152600087015161018082015260206000018701516101a08201527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c26101c08201527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6101e08201527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b6102008201527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa610220820152843561024082015260208501356102608201527f28f15945c0d350dc79c3fa9aeae56a7c6f70a38baaa48bbda19531ac056433796102808201527f14fc776a7ce28afa94649f38f373a61f64ac984c02eee7eb8a36e68ac69edfed6102a08201527f2b135a25ce834c21818185f0779ddaf65f831d6cb941d74a6e8a10ce1b0e05616102c08201527f2f41f6b9a171433f2a2eaa0442b6cc89785eddcbd269e2a4386dbd91f6253b846102e08201526020816103008360086107d05a03fa9051169695505050505050565b6040516103808101604052610742600084013561021e565b61074f602084013561021e565b61075c604084013561021e565b610769606084013561021e565b610776608084013561021e565b610783818486888a6102bd565b90508060005260206000f35b60008060405180604001604052808781526020016040518060a001604052808881526020018781526020016040518060400160405280600060028111156107d8576107d861106b565b8152600060209182018190529183528201526040018690529052905061020d816100b1565b6000600280604051610826907072697363302e526563656970744d65746160781b815260110190565b602060405180830381855afa158015610843573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906108669190611052565b606084015184516020860151608087015160408801515160189060028111156108915761089161106b565b60408a810151602090810151825191820199909952908101969096526060860194909452608085019290925260a084015263ffffffff909116901b60e01b6001600160e01b03191660c082015260f89190911b6001600160f81b03191660c4820152600160fa1b60c882015260ca0160408051601f198184030181529082905261091a91611081565b602060405180830381855afa158015610937573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061095a9190611052565b92915050565b60008080610aad8460008190506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b6008827fff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0016901c1790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b6010827fffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff000016901c1790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b6020827fffffffff00000000ffffffff00000000ffffffff00000000ffffffff0000000016901c17905060408177ffffffffffffffff0000000000000000ffffffffffffffff16901b60408277ffffffffffffffff0000000000000000ffffffffffffffff1916901c179050608081901b608082901c179050919050565b6fffffffffffffffffffffffffffffffff81169560809190911c945092505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610b0857610b08610acf565b60405290565b60405160a0810167ffffffffffffffff81118282101715610b0857610b08610acf565b6040516060810167ffffffffffffffff81118282101715610b0857610b08610acf565b600082601f830112610b6557600080fd5b813567ffffffffffffffff80821115610b8057610b80610acf565b604051601f8301601f19908116603f01168101908282118183101715610ba857610ba8610acf565b81604052838152866020858801011115610bc157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610bf357600080fd5b813567ffffffffffffffff80821115610c0b57600080fd5b9083019081850360e0811215610c2057600080fd5b610c28610ae5565b833583811115610c3757600080fd5b610c4388828701610b54565b82525060c0601f1983011215610c5857600080fd5b610c60610b0e565b925060208401358352604084013560208401526040605f1983011215610c8557600080fd5b610c8d610ae5565b9150606084013560038110610ca157600080fd5b8252608084013560ff81168114610cb757600080fd5b602083810191909152604084019290925260a0840135606084015260c09093013560808301528201529392505050565b600080600080600060808688031215610cff57600080fd5b853567ffffffffffffffff80821115610d1757600080fd5b610d2389838a01610b54565b965060208801359550604088013594506060880135915080821115610d4757600080fd5b818801915088601f830112610d5b57600080fd5b813581811115610d6a57600080fd5b896020828501011115610d7c57600080fd5b9699959850939650602001949392505050565b806040810183101561095a57600080fd5b806080810183101561095a57600080fd5b6000806000806101808587031215610dc857600080fd5b610dd28686610d8f565b9350610de18660408701610da0565b9250610df08660c08701610d8f565b9150610e00866101008701610da0565b905092959194509250565b60008060008060808587031215610e2157600080fd5b843567ffffffffffffffff811115610e3857600080fd5b610e4487828801610b54565b97602087013597506040870135966060013595509350505050565b600082601f830112610e7057600080fd5b610e78610ae5565b806040840185811115610e8a57600080fd5b845b81811015610ea4578051845260209384019301610e8c565b509095945050505050565b60006101008284031215610ec257600080fd5b610eca610b31565b610ed48484610e5f565b8152604084605f850112610ee757600080fd5b610eef610ae5565b8060c0860187811115610f0157600080fd5b8387015b81811015610f2657610f178982610e5f565b84526020909301928401610f05565b50816020860152610f378882610e5f565b84860152505050508091505092915050565b8060005b6002811015610f6c578151845260209384019390910190600101610f4d565b50505050565b6101808101610f818287610f49565b60408083018660005b6002808210610f995750610fd4565b82518460005b83811015610fbd578251825260209283019290910190600101610f9f565b505050928401925060209190910190600101610f8a565b50505050610fe560c0830185610f49565b61010082018360005b600481101561100d578151835260209283019290910190600101610fee565b50505095945050505050565b60006020828403121561102b57600080fd5b8151801515811461103b57600080fd5b9392505050565b8183823760009101908152919050565b60006020828403121561106457600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b6000825160005b818110156110a25760208186018101518583015201611088565b50600092019182525091905056fea26469706673582212200cde923866632e8f7a5048b7a3ec8f0b09dcc97a212b8fe7669f23f7b2f005eb64736f6c63430008140033

Deployed Bytecode Sourcemap

2975:2784:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4135:313;;;;;;:::i;:::-;;:::i;:::-;;;3248:14:4;;3241:22;3223:41;;3211:2;3196:18;4135:313:2;;;;;;;5522:235;;;;;;:::i;:::-;;:::i;3869:4268:1:-;;;;;;:::i;:::-;;:::i;4802:366:2:-;;;;;;:::i;:::-;;:::i;4135:313::-;4196:4;4213:13;4228;4245:34;4257:21;:7;:12;;;:19;:21::i;:::-;4245:11;:34::i;:::-;4212:67;;;;4289:16;4319:7;:12;;;4308:32;;;;;;;;;;;;:::i;:::-;4289:51;;4357:4;-1:-1:-1;;;;;4357:16:2;;4374:4;:6;;;4382:4;:6;;;4390:4;:6;;;4357:84;;;;;;;;3281:34;4357:84;;;;3371:34;4357:84;;;;4427:5;4357:84;;;;4434:5;4357:84;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4350:91;4135:313;-1:-1:-1;;;;;4135:313:2:o;5522:235::-;5668:4;5695:55;5702:4;5708:7;5717:15;5734;5741:7;;5734:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5695:55::-;5688:62;5522:235;-1:-1:-1;;;;;;5522:235:2:o;3869:4268:1:-;4060:4;4099:163;;;4156:1;4153;4150:8;4140:108;;4192:1;4189;4182:12;4225:4;4222:1;4215:15;4140:108;4099:163;:::o;4354:738::-;4405:11;4450:4;4444:11;4484:1;4479:3;4472:14;4524:1;4519:2;4514:3;4510:12;4503:23;4564:1;4559:2;4554:3;4550:12;4543:23;4641:2;4636:3;4632:2;4627:3;4624:1;4617:4;4610:5;4606:16;4595:49;4584:60;;4672:7;4662:107;;4713:1;4710;4703:12;4746:4;4743:1;4736:15;4662:107;4814:2;4808:9;4803:2;4798:3;4794:12;4787:31;4870:2;4866;4862:11;4856:18;4851:2;4846:3;4842:12;4835:40;4950:2;4946;4941:3;4936;4933:1;4926:4;4919:5;4915:16;4904:49;4893:60;;;4981:7;4971:107;;5022:1;5019;5012:12;5055:4;5052:1;5045:15;4971:107;;4354:738;;;;:::o;5106:2405::-;5294:4;5281:18;;5338:4;5333:2;5323:13;;5316:27;5161:4;5211:8;5201:19;;5205:4;5417:62;5446:32;;5440:4;5434;5205;5417:62;:::i;:::-;5497:63;5555:2;5543:10;5539:19;5526:33;5520:4;5514;5508;5497:63;:::i;:::-;5578;5636:2;5624:10;5620:19;5607:33;5601:4;5595;5589;5578:63;:::i;:::-;5659;5717:2;5705:10;5701:19;5688:33;5682:4;5676;5670;5659:63;:::i;:::-;;5793:2;5780:16;5769:9;5762:35;5880:1;5873:2;5869;5865:11;5852:25;5849:1;5845:33;5841:41;5836:2;5825:9;5821:18;5814:69;5962:2;5949:16;5944:2;5933:9;5929:18;5922:44;6031:2;6027;6023:11;6010:25;6005:2;5994:9;5990:18;5983:53;6102:2;6098;6094:11;6081:25;6075:3;6064:9;6060:19;6053:54;6173:2;6169;6165:11;6152:25;6146:3;6135:9;6131:19;6124:54;6250:6;6244:3;6233:9;6229:19;6222:35;6302:6;6296:3;6285:9;6281:19;6274:35;6380:6;6374:3;6363:9;6359:19;6352:35;6432:6;6426:3;6415:9;6411:19;6404:35;6484:6;6478:3;6467:9;6463:19;6456:35;6536:6;6530:3;6519:9;6515:19;6508:35;6629:3;6623:4;6619:14;6613:21;6607:3;6596:9;6592:19;6585:50;6705:2;6700:3;6696:12;6690:4;6686:23;6680:30;6674:3;6663:9;6659:19;6652:59;6783:7;6777:3;6766:9;6762:19;6755:36;6836:7;6830:3;6819:9;6815:19;6808:36;6889:7;6883:3;6872:9;6868:19;6861:36;6942:7;6936:3;6925:9;6921:19;6914:36;7030:2;7017:16;7011:3;7000:9;6996:19;6989:45;7100:2;7096;7092:11;7079:25;7073:3;7062:9;7058:19;7051:54;7177:7;7171:3;7160:9;7156:19;7149:36;7230:7;7224:3;7213:9;7209:19;7202:36;7283:7;7277:3;7266:9;7262:19;7255:36;7336:7;7330:3;7319:9;7315:19;7308:36;7436:4;7425:9;7420:3;7409:9;7406:1;7399:4;7392:5;7388:16;7377:64;7480:16;;7467:30;;5106:2405;-1:-1:-1;;;;;;5106:2405:1:o;:::-;7543:4;7537:11;7584:8;7578:4;7574:19;7568:4;7561:33;7660:45;7701:1;7688:11;7684:19;7671:33;7660:45;:::i;:::-;7719:46;7760:2;7747:11;7743:20;7730:34;7719:46;:::i;:::-;7779;7820:2;7807:11;7803:20;7790:34;7779:46;:::i;:::-;7839;7880:2;7867:11;7863:20;7850:34;7839:46;:::i;:::-;7899:47;7940:3;7927:11;7923:21;7910:35;7899:47;:::i;:::-;8015:46;8056:4;8043:11;8038:3;8033;8028;8015:46;:::i;:::-;8000:61;;8085:7;8082:1;8075:18;8116:4;8113:1;8106:15;4802:366:2;4945:4;4965:22;4990:139;;;;;;;;5011:4;4990:139;;;;5017:102;;;;;;;;5033:7;5017:102;;;;5042:15;5017:102;;;;5059:34;;;;;;;;5068:21;5059:34;;;;;;;;:::i;:::-;;;5091:1;5059:34;;;;;;;5017:102;;;;;;;;;;;4990:139;;4965:164;-1:-1:-1;5146:15:2;4965:164;5146:6;:15::i;1691:534:0:-;1759:7;1785:433;1657:27;;;;;-1:-1:-1;;;10194:32:4;;10251:2;10242:12;;9993:267;1657:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1891:10;;;;1919:19;;1956:20;;;;1994:11;;;;2054:13;;;;:20;2079:2;;2047:28;;;;;;;;:::i;:::-;2106:13;;;;;:18;;;;;1805:403;;;;;10584:19:4;;;;10619:12;;;10612:28;;;;10656:12;;;10649:28;;;;10693:12;;;10686:28;;;;10730:13;;;10723:29;2047:34:0;;;;;;10775:3:4;10826:16;-1:-1:-1;;;;;;10822:25:4;10807:13;;;10800:48;10883:16;;;;;-1:-1:-1;;;;;;10883:16:4;10864:13;;;10857:48;-1:-1:-1;;;10921:13:4;;;10914:61;10991:13;;1805:403:0;;;-1:-1:-1;;1805:403:0;;;;;;;;;;1785:433;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1778:440;1691:534;-1:-1:-1;;1691:534:0:o;3733:234:2:-;3793:7;;;3840:40;3872:6;1412:9;1433:5;1429:9;;1634:1;1559;1563:66;1559:70;1558:77;;1544:1;1469;1473:66;1469:70;1468:77;;1467:169;1463:173;;1845:2;1770:1;1774:66;1770:70;1769:78;;1754:2;1679:1;1683:66;1679:70;1678:78;;1677:171;1673:175;;2057:2;1982:1;1986:66;1982:70;1981:78;;1966:2;1891:1;1895:66;1891:70;1890:78;;1889:171;1885:175;;2269:2;2194:1;2198:66;2194:70;2193:78;;2178:2;2103:1;-1:-1:-1;;2103:70:2;2102:78;;2101:171;2097:175;;2333:3;2328:1;:8;;2320:3;2315:1;:8;;2314:23;2310:27;;1350:990;;;;3840:40;3898:35;;;;3955:3;3943:15;;;;;-1:-1:-1;3733:234:2;-1:-1:-1;;;3733:234:2:o;14:127:4:-;75:10;70:3;66:20;63:1;56:31;106:4;103:1;96:15;130:4;127:1;120:15;146:252;213:4;207:11;;;245:17;;292:18;277:34;;313:22;;;274:62;271:88;;;339:18;;:::i;:::-;375:4;368:24;146:252;:::o;403:253::-;475:2;469:9;517:4;505:17;;552:18;537:34;;573:22;;;534:62;531:88;;;599:18;;:::i;661:253::-;733:2;727:9;775:4;763:17;;810:18;795:34;;831:22;;;792:62;789:88;;;857:18;;:::i;919:718::-;961:5;1014:3;1007:4;999:6;995:17;991:27;981:55;;1032:1;1029;1022:12;981:55;1068:6;1055:20;1094:18;1131:2;1127;1124:10;1121:36;;;1137:18;;:::i;:::-;1212:2;1206:9;1180:2;1266:13;;-1:-1:-1;;1262:22:4;;;1286:2;1258:31;1254:40;1242:53;;;1310:18;;;1330:22;;;1307:46;1304:72;;;1356:18;;:::i;:::-;1396:10;1392:2;1385:22;1431:2;1423:6;1416:18;1477:3;1470:4;1465:2;1457:6;1453:15;1449:26;1446:35;1443:55;;;1494:1;1491;1484:12;1443:55;1558:2;1551:4;1543:6;1539:17;1532:4;1524:6;1520:17;1507:54;1605:1;1598:4;1593:2;1585:6;1581:15;1577:26;1570:37;1625:6;1616:15;;;;;;919:718;;;;:::o;1642:1436::-;1724:6;1777:2;1765:9;1756:7;1752:23;1748:32;1745:52;;;1793:1;1790;1783:12;1745:52;1833:9;1820:23;1862:18;1903:2;1895:6;1892:14;1889:34;;;1919:1;1916;1909:12;1889:34;1942:22;;;;1983:16;;;2019:4;2011:13;;2008:33;;;2037:1;2034;2027:12;2008:33;2063:17;;:::i;:::-;2118:2;2105:16;2146:2;2136:8;2133:16;2130:36;;;2162:1;2159;2152:12;2130:36;2189:44;2225:7;2214:8;2210:2;2206:17;2189:44;:::i;:::-;2175:59;;-1:-1:-1;2268:4:4;-1:-1:-1;;2250:16:4;;2246:27;2243:47;;;2286:1;2283;2276:12;2243:47;2314:22;;:::i;:::-;2299:37;;2382:2;2378;2374:11;2361:25;2352:7;2345:42;2442:4;2438:2;2434:13;2421:27;2416:2;2407:7;2403:16;2396:53;2483:4;2477:2;2473:7;2469:2;2465:16;2461:27;2458:47;;;2501:1;2498;2491:12;2458:47;2529:17;;:::i;:::-;2514:32;;2591:2;2587;2583:11;2570:25;2626:1;2617:7;2614:14;2604:42;;2642:1;2639;2632:12;2604:42;2655:24;;2724:3;2716:12;;2703:26;2773:4;2760:18;;2748:31;;2738:59;;2793:1;2790;2783:12;2738:59;2826:2;2813:16;;;2806:33;;;;2868:4;2855:18;;2848:35;;;;2938:4;2930:13;;2917:27;2912:2;2899:16;;2892:53;3001:4;2993:13;;;2980:27;2974:3;2961:17;;2954:54;3024:14;;3017:31;3028:5;1642:1436;-1:-1:-1;;;1642:1436:4:o;3275:926::-;3381:6;3389;3397;3405;3413;3466:3;3454:9;3445:7;3441:23;3437:33;3434:53;;;3483:1;3480;3473:12;3434:53;3523:9;3510:23;3552:18;3593:2;3585:6;3582:14;3579:34;;;3609:1;3606;3599:12;3579:34;3632:49;3673:7;3664:6;3653:9;3649:22;3632:49;:::i;:::-;3622:59;;3728:2;3717:9;3713:18;3700:32;3690:42;;3779:2;3768:9;3764:18;3751:32;3741:42;;3836:2;3825:9;3821:18;3808:32;3792:48;;3865:2;3855:8;3852:16;3849:36;;;3881:1;3878;3871:12;3849:36;3919:8;3908:9;3904:24;3894:34;;3966:7;3959:4;3955:2;3951:13;3947:27;3937:55;;3988:1;3985;3978:12;3937:55;4028:2;4015:16;4054:2;4046:6;4043:14;4040:34;;;4070:1;4067;4060:12;4040:34;4115:7;4110:2;4101:6;4097:2;4093:15;4089:24;4086:37;4083:57;;;4136:1;4133;4126:12;4083:57;3275:926;;;;-1:-1:-1;3275:926:4;;-1:-1:-1;4167:2:4;4159:11;;4189:6;3275:926;-1:-1:-1;;;3275:926:4:o;4206:159::-;4300:6;4333:2;4321:15;;4318:24;-1:-1:-1;4315:44:4;;;4355:1;4352;4345:12;4370:175;4479:6;4512:3;4500:16;;4497:25;-1:-1:-1;4494:45:4;;;4535:1;4532;4525:12;4550:662;4761:6;4769;4777;4785;4838:3;4826:9;4817:7;4813:23;4809:33;4806:53;;;4855:1;4852;4845:12;4806:53;4878;4923:7;4912:9;4878:53;:::i;:::-;4868:63;;4950:77;5019:7;5014:2;5003:9;4999:18;4950:77;:::i;:::-;4940:87;;5046:63;5101:7;5095:3;5084:9;5080:19;5046:63;:::i;:::-;5036:73;;5128:78;5198:7;5192:3;5181:9;5177:19;5128:78;:::i;:::-;5118:88;;4550:662;;;;;;;:::o;5217:525::-;5312:6;5320;5328;5336;5389:3;5377:9;5368:7;5364:23;5360:33;5357:53;;;5406:1;5403;5396:12;5357:53;5446:9;5433:23;5479:18;5471:6;5468:30;5465:50;;;5511:1;5508;5501:12;5465:50;5534:49;5575:7;5566:6;5555:9;5551:22;5534:49;:::i;:::-;5524:59;5630:2;5615:18;;5602:32;;-1:-1:-1;5681:2:4;5666:18;;5653:32;;5732:2;5717:18;5704:32;;-1:-1:-1;5217:525:4;-1:-1:-1;;;;5217:525:4:o;5747:483::-;5808:5;5861:3;5854:4;5846:6;5842:17;5838:27;5828:55;;5879:1;5876;5869:12;5828:55;5903:17;;:::i;:::-;5942:3;5980:2;5972:6;5968:15;6006:3;5998:6;5995:15;5992:35;;;6023:1;6020;6013:12;5992:35;6047:6;6062:139;6078:6;6073:3;6070:15;6062:139;;;6146:10;;6134:23;;6186:4;6177:14;;;;6095;6062:139;;;-1:-1:-1;6219:5:4;;5747:483;-1:-1:-1;;;;;5747:483:4:o;6235:908::-;6326:6;6379:3;6367:9;6358:7;6354:23;6350:33;6347:53;;;6396:1;6393;6386:12;6347:53;6422:22;;:::i;:::-;6467:55;6514:7;6503:9;6467:55;:::i;:::-;6460:5;6453:70;6542:2;6587:7;6582:2;6571:9;6567:18;6563:32;6553:60;;6609:1;6606;6599:12;6553:60;6633:17;;:::i;:::-;6672:3;6713;6702:9;6698:19;6740:7;6732:6;6729:19;6726:39;;;6761:1;6758;6751:12;6726:39;6800:2;6789:9;6785:18;6812:176;6828:6;6823:3;6820:15;6812:176;;;6894:49;6935:7;6930:3;6894:49;:::i;:::-;6882:62;;6973:4;6964:14;;;;6845:12;;6812:176;;;6816:3;7022:5;7015:4;7008:5;7004:16;6997:31;7060:52;7104:7;7096:6;7060:52;:::i;:::-;7055:2;7048:5;7044:14;7037:76;;;;;7132:5;7122:15;;;6235:908;;;;:::o;7148:326::-;7241:5;7264:1;7274:194;7288:4;7285:1;7282:11;7274:194;;;7347:13;;7335:26;;7384:4;7408:12;;;;7443:15;;;;7308:1;7301:9;7274:194;;;7278:3;;7148:326;;:::o;7479:1630::-;7927:3;7912:19;;7940:43;7916:9;7965:6;7940:43;:::i;:::-;8002:2;8039;8028:9;8024:18;8084:6;8108:1;8118:586;8182:4;8215:2;8212:1;8209:9;8199:30;;8222:5;;;8199:30;8252:13;;8291:3;8374:1;8388:234;8404:2;8399:3;8396:11;8388:234;;;8475:15;;8461:30;;8518:4;8591:17;;;;8548:14;;;;8426:1;8417:11;8388:234;;;-1:-1:-1;;;8642:12:4;;;;-1:-1:-1;8689:4:4;8677:17;;;;;8145:1;8138:9;8118:586;;;8122:3;;;;8713:53;8761:3;8750:9;8746:19;8738:6;8713:53;:::i;:::-;8803:3;8792:9;8788:19;8855:6;8881:1;8891:212;8907:4;8902:3;8899:13;8891:212;;;8972:15;;8958:30;;9011:4;9037:14;;;;9076:17;;;;8931:1;8922:11;8891:212;;;8895:3;;;7479:1630;;;;;;;:::o;9114:277::-;9181:6;9234:2;9222:9;9213:7;9209:23;9205:32;9202:52;;;9250:1;9247;9240:12;9202:52;9282:9;9276:16;9335:5;9328:13;9321:21;9314:5;9311:32;9301:60;;9357:1;9354;9347:12;9301:60;9380:5;9114:277;-1:-1:-1;;;9114:277:4:o;9396:271::-;9579:6;9571;9566:3;9553:33;9535:3;9605:16;;9630:13;;;9605:16;9396:271;-1:-1:-1;9396:271:4:o;9672:184::-;9742:6;9795:2;9783:9;9774:7;9770:23;9766:32;9763:52;;;9811:1;9808;9801:12;9763:52;-1:-1:-1;9834:16:4;;9672:184;-1:-1:-1;9672:184:4:o;9861:127::-;9922:10;9917:3;9913:20;9910:1;9903:31;9953:4;9950:1;9943:15;9977:4;9974:1;9967:15;11015:412;11144:3;11182:6;11176:13;11207:1;11217:129;11231:6;11228:1;11225:13;11217:129;;;11329:4;11313:14;;;11309:25;;11303:32;11290:11;;;11283:53;11246:12;11217:129;;;-1:-1:-1;11401:1:4;11365:16;;11390:13;;;-1:-1:-1;11365:16:4;11015:412;-1:-1:-1;11015:412:4:o

Swarm Source

ipfs://0cde923866632e8f7a5048b7a3ec8f0b09dcc97a212b8fe7669f23f7b2f005eb

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.