Sepolia Testnet

Contract

0x6C447007Fa0a42F01bf0DcC5cae7EFDB8277247c

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Verify52464122024-02-08 17:50:36131 days ago1707414636IN
0x6C447007...B8277247c
0 ETH0.001655486.75996967
Verify52461272024-02-08 16:51:24131 days ago1707411084IN
0x6C447007...B8277247c
0 ETH0.001986458.11184156
Verify52461202024-02-08 16:49:48131 days ago1707410988IN
0x6C447007...B8277247c
0 ETH0.002272189.27867201
Verify52461132024-02-08 16:48:24131 days ago1707410904IN
0x6C447007...B8277247c
0 ETH0.00293411.98125321
Verify52461092024-02-08 16:47:36131 days ago1707410856IN
0x6C447007...B8277247c
0 ETH0.002206399.01045769
Verify52461042024-02-08 16:46:36131 days ago1707410796IN
0x6C447007...B8277247c
0 ETH0.00157836.44546325
Verify52460952024-02-08 16:44:48131 days ago1707410688IN
0x6C447007...B8277247c
0 ETH0.00163456.67462904
Verify52460822024-02-08 16:42:12131 days ago1707410532IN
0x6C447007...B8277247c
0 ETH0.002274019.28568701
Verify52460702024-02-08 16:39:48131 days ago1707410388IN
0x6C447007...B8277247c
0 ETH0.002189778.9421429
Verify52460572024-02-08 16:37:12131 days ago1707410232IN
0x6C447007...B8277247c
0 ETH0.002339639.55361664
Verify52459732024-02-08 16:19:48131 days ago1707409188IN
0x6C447007...B8277247c
0 ETH0.0034619614.13652435
0x60c0604052456882024-02-08 15:20:12131 days ago1707405612IN
 Create: RiscZeroGroth16Verifier
0 ETH0.0115292111.59968399

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RiscZeroGroth16Verifier

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity Multiple files format)

File 1 of 5: RiscZeroGroth16Verifier.sol
// Copyright 2024 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 "./SafeCast.sol";

import {ControlID} from "./ControlID.sol";
import {Groth16Verifier} from "./Groth16Verifier.sol";
import {
    ExitCode,
    IRiscZeroVerifier,
    Output,
    OutputLib,
    Receipt,
    ReceiptClaim,
    ReceiptClaimLib,
    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 claim.
struct Seal {
    uint256[2] a;
    uint256[2][2] b;
    uint256[2] c;
}

/// @notice Groth16 verifier contract for RISC Zero receipts of execution.
contract RiscZeroGroth16Verifier is IRiscZeroVerifier, Groth16Verifier {
    using ReceiptClaimLib for ReceiptClaim;
    using OutputLib for Output;
    using SafeCast for uint256;

    /// @notice Control ID hash for the identity_p254 predicate decomposed by `splitDigest`.
    /// @dev This value controls what set of recursion programs, and therefore what version of the
    /// zkVM circuit, will be accepted by this contract. Each instance of this verifier contract
    /// will accept a single release of the RISC Zero circuits.
    ///
    /// New releases of RISC Zero's zkVM require updating these values. These values can be
    /// obtained by running `cargo run --bin bonsai-ethereum-contracts -F control-id`
    uint256 public immutable CONTROL_ID_0;
    uint256 public immutable CONTROL_ID_1;

    constructor(uint256 control_id_0, uint256 control_id_1) {
        CONTROL_ID_0 = control_id_0;
        CONTROL_ID_1 = control_id_1;
    }

    /// @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));
    }

    /// @inheritdoc IRiscZeroVerifier
    function verify(bytes calldata seal, bytes32 imageId, bytes32 postStateDigest, bytes32 journalDigest)
        public
        view
        returns (bool)
    {
        Receipt memory receipt = Receipt(
            seal,
            ReceiptClaim(
                imageId,
                postStateDigest,
                ExitCode(SystemExitCode.Halted, 0),
                bytes32(0),
                Output(journalDigest, bytes32(0)).digest()
            )
        );
        return verify_integrity(receipt);
    }

    /// @inheritdoc IRiscZeroVerifier
    function verify_integrity(Receipt memory receipt) public view returns (bool) {
        (uint256 claim0, uint256 claim1) = splitDigest(receipt.claim.digest());
        Seal memory seal = abi.decode(receipt.seal, (Seal));
        return this.verifyProof(seal.a, seal.b, seal.c, [CONTROL_ID_0, CONTROL_ID_1, claim0, claim1]);
    }
}

File 2 of 5: ControlID.sol
// Copyright 2024 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

// This file is autogenerated.

pragma solidity ^0.8.9;

library ControlID {
    uint256 public constant CONTROL_ID_0 = 0x447d7e12291364db4bc5421164880129;
    uint256 public constant CONTROL_ID_1 = 0x12c49ad247d28a32147e13615c6c81f9;
}

File 3 of 5: 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 5: IRiscZeroVerifier.sol
// Copyright 2024 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 Public claims about a zkVM guest execution, such as the journal committed to by the guest.
/// @dev Also includes important information such as the exit code and the starting and ending system
/// state (i.e. the state of memory). `ReceiptClaim` is a "Merkle-ized struct" supporting
/// partial openings of the underlying fields from a hash commitment to the full structure.
struct ReceiptClaim {
    /// @notice Digest of the SystemState just before execution has begun.
    bytes32 preStateDigest;
    /// @notice Digest of the SystemState just after execution has completed.
    bytes32 postStateDigest;
    /// @notice The exit code for the execution.
    ExitCode exitCode;
    /// @notice A digest of the input to the guest.
    /// @dev This field is currently unused and must be set to the zero digest.
    bytes32 input;
    /// @notice Digest of the Output of the guest, including the journal
    /// and assumptions set during execution.
    bytes32 output;
}

library ReceiptClaimLib {
    bytes32 constant TAG_DIGEST = sha256("risc0.ReceiptClaim");

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

/// @notice Exit condition indicated by the zkVM at the end of the guest execution.
/// @dev Exit codes have a "system" part and a "user" part. Semantically, the system part is set to
/// indicate the type of exit (e.g. halt, pause, or system split) and is directly controlled by the
/// zkVM. The user part is an exit code, similar to exit codes used in Linux, chosen by the guest
/// program to indicate additional information (e.g. 0 to indicate success or 1 to indicate an
/// error).
struct ExitCode {
    SystemExitCode system;
    uint8 user;
}

/// @notice Exit condition indicated by the zkVM at the end of the execution covered by this proof.
/// @dev
/// `Halted` indicates normal termination of a program with an interior exit code returned from the
/// guest program. A halted program cannot be resumed.
///
/// `Paused` indicates the execution ended in a paused state with an interior exit code set by the
/// guest program. A paused program can be resumed such that execution picks up where it left
/// of, with the same memory state.
///
/// `SystemSplit` indicates the execution ended on a host-initiated system split. System split is
/// mechanism by which the host can temporarily stop execution of the execution ended in a system
/// split has no output and no conclusions can be drawn about whether the program will eventually
/// halt. System split is used in continuations to split execution into individually provable segments.
enum SystemExitCode {
    Halted,
    Paused,
    SystemSplit
}

/// @notice Output field in the `ReceiptClaim`, committing to a claimed journal and assumptions list.
struct Output {
    /// @notice Digest of the journal committed to by the guest execution.
    bytes32 journalDigest;
    /// @notice Digest of the ordered list of `ReceiptClaim` digests corresponding to the
    /// calls to `env::verify` and `env::verify_integrity`.
    /// @dev Verifying the integrity of a `Receipt` corresponding to a `ReceiptClaim` with a
    /// non-empty assumptions list does not guarantee unconditionally any of the claims over the
    /// guest execution (i.e. if the assumptions list is non-empty, then the journal digest cannot
    /// be trusted to correspond to a genuine execution). The claims can be checked by additional
    /// verifying a `Receipt` for every digest in the assumptions list.
    bytes32 assumptionsDigest;
}

library OutputLib {
    bytes32 constant TAG_DIGEST = sha256("risc0.Output");

    function digest(Output memory output) internal pure returns (bytes32) {
        return sha256(
            abi.encodePacked(
                TAG_DIGEST,
                // down
                output.journalDigest,
                output.assumptionsDigest,
                // down.length
                uint16(2) << 8
            )
        );
    }
}

/// @notice A receipt attesting to the execution of a guest program.
/// @dev A receipt contains two parts: a seal and a claim. The seal is a zero-knowledge proof
/// attesting to knowledge of a zkVM execution resulting the claim. The claim is a set of public
/// outputs for the execution. Crucially, the claim includes the journal and the image ID. The
/// image ID identifies the program that was executed, and the journal is the public data written
/// by the program.
struct Receipt {
    bytes seal;
    ReceiptClaim claim;
}

/// @notice Verifier interface for RISC Zero receipts of execution.
interface IRiscZeroVerifier {
    /// @notice Verify that the given seal is a valid RISC Zero proof of execution with the
    ///     given image ID, post-state digest, and journal digest.
    /// @dev This method additionally ensures that the input hash is all-zeros (i.e. no
    /// committed input), the exit code is (Halted, 0), and there are no assumptions (i.e. the
    /// receipt is unconditional).
    /// @param seal The encoded cryptographic proof (i.e. SNARK).
    /// @param imageId The identifier for the guest program.
    /// @param postStateDigest A hash of the final memory state. Required to run the verifier, but
    ///     otherwise can be left unconstrained for most use cases.
    /// @param journalDigest The SHA-256 digest of the journal bytes.
    /// @return true if the receipt passes the verification checks. The return code must be checked.
    function verify(bytes calldata seal, bytes32 imageId, bytes32 postStateDigest, bytes32 journalDigest)
        external
        view
        returns (bool);

    /// @notice Verify that the given receipt is a valid RISC Zero receipt, ensuring the `seal` is
    /// valid a cryptographic proof of the execution with the given `claim`.
    /// @param receipt The receipt to be verified.
    /// @return true if the receipt passes the verification checks. The return code must be checked.
    function verify_integrity(Receipt calldata receipt) external view returns (bool);
}

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

pragma solidity ^0.8.20;

/**
 * @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.
 */
library SafeCast {
    /**
     * @dev Value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);

    /**
     * @dev An int value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedIntToUint(int256 value);

    /**
     * @dev Value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);

    /**
     * @dev An uint value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedUintToInt(uint256 value);

    /**
     * @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
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        if (value > type(uint248).max) {
            revert SafeCastOverflowedUintDowncast(248, value);
        }
        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
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        if (value > type(uint240).max) {
            revert SafeCastOverflowedUintDowncast(240, value);
        }
        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
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        if (value > type(uint232).max) {
            revert SafeCastOverflowedUintDowncast(232, value);
        }
        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
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        if (value > type(uint224).max) {
            revert SafeCastOverflowedUintDowncast(224, value);
        }
        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
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        if (value > type(uint216).max) {
            revert SafeCastOverflowedUintDowncast(216, value);
        }
        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
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        if (value > type(uint208).max) {
            revert SafeCastOverflowedUintDowncast(208, value);
        }
        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
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        if (value > type(uint200).max) {
            revert SafeCastOverflowedUintDowncast(200, value);
        }
        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
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        if (value > type(uint192).max) {
            revert SafeCastOverflowedUintDowncast(192, value);
        }
        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
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        if (value > type(uint184).max) {
            revert SafeCastOverflowedUintDowncast(184, value);
        }
        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
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        if (value > type(uint176).max) {
            revert SafeCastOverflowedUintDowncast(176, value);
        }
        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
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        if (value > type(uint168).max) {
            revert SafeCastOverflowedUintDowncast(168, value);
        }
        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
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        if (value > type(uint160).max) {
            revert SafeCastOverflowedUintDowncast(160, value);
        }
        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
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        if (value > type(uint152).max) {
            revert SafeCastOverflowedUintDowncast(152, value);
        }
        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
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        if (value > type(uint144).max) {
            revert SafeCastOverflowedUintDowncast(144, value);
        }
        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
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        if (value > type(uint136).max) {
            revert SafeCastOverflowedUintDowncast(136, value);
        }
        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
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        if (value > type(uint128).max) {
            revert SafeCastOverflowedUintDowncast(128, value);
        }
        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
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        if (value > type(uint120).max) {
            revert SafeCastOverflowedUintDowncast(120, value);
        }
        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
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        if (value > type(uint112).max) {
            revert SafeCastOverflowedUintDowncast(112, value);
        }
        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
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        if (value > type(uint104).max) {
            revert SafeCastOverflowedUintDowncast(104, value);
        }
        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
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        if (value > type(uint96).max) {
            revert SafeCastOverflowedUintDowncast(96, value);
        }
        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
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        if (value > type(uint88).max) {
            revert SafeCastOverflowedUintDowncast(88, value);
        }
        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
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        if (value > type(uint80).max) {
            revert SafeCastOverflowedUintDowncast(80, value);
        }
        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
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        if (value > type(uint72).max) {
            revert SafeCastOverflowedUintDowncast(72, value);
        }
        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
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        if (value > type(uint64).max) {
            revert SafeCastOverflowedUintDowncast(64, value);
        }
        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
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        if (value > type(uint56).max) {
            revert SafeCastOverflowedUintDowncast(56, value);
        }
        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
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        if (value > type(uint48).max) {
            revert SafeCastOverflowedUintDowncast(48, value);
        }
        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
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        if (value > type(uint40).max) {
            revert SafeCastOverflowedUintDowncast(40, value);
        }
        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
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        if (value > type(uint32).max) {
            revert SafeCastOverflowedUintDowncast(32, value);
        }
        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
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        if (value > type(uint24).max) {
            revert SafeCastOverflowedUintDowncast(24, value);
        }
        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
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        if (value > type(uint16).max) {
            revert SafeCastOverflowedUintDowncast(16, value);
        }
        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
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        if (value > type(uint8).max) {
            revert SafeCastOverflowedUintDowncast(8, value);
        }
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        if (value < 0) {
            revert SafeCastOverflowedIntToUint(value);
        }
        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
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(248, value);
        }
    }

    /**
     * @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
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(240, value);
        }
    }

    /**
     * @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
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(232, value);
        }
    }

    /**
     * @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
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(224, value);
        }
    }

    /**
     * @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
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(216, value);
        }
    }

    /**
     * @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
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(208, value);
        }
    }

    /**
     * @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
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(200, value);
        }
    }

    /**
     * @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
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(192, value);
        }
    }

    /**
     * @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
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(184, value);
        }
    }

    /**
     * @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
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(176, value);
        }
    }

    /**
     * @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
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(168, value);
        }
    }

    /**
     * @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
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(160, value);
        }
    }

    /**
     * @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
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(152, value);
        }
    }

    /**
     * @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
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(144, value);
        }
    }

    /**
     * @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
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(136, value);
        }
    }

    /**
     * @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
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(128, value);
        }
    }

    /**
     * @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
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(120, value);
        }
    }

    /**
     * @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
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(112, value);
        }
    }

    /**
     * @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
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(104, value);
        }
    }

    /**
     * @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
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(96, value);
        }
    }

    /**
     * @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
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(88, value);
        }
    }

    /**
     * @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
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(80, value);
        }
    }

    /**
     * @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
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(72, value);
        }
    }

    /**
     * @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
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(64, value);
        }
    }

    /**
     * @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
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(56, value);
        }
    }

    /**
     * @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
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(48, value);
        }
    }

    /**
     * @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
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(40, value);
        }
    }

    /**
     * @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
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(32, value);
        }
    }

    /**
     * @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
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(24, value);
        }
    }

    /**
     * @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
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(16, value);
        }
    }

    /**
     * @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
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(8, value);
        }
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        if (value > uint256(type(int256).max)) {
            revert SafeCastOverflowedUintToInt(value);
        }
        return int256(value);
    }
}

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"control_id_0","type":"uint256"},{"internalType":"uint256","name":"control_id_1","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CONTROL_ID_0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONTROL_ID_1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"journalDigest","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"},{"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 ReceiptClaim","name":"claim","type":"tuple"}],"internalType":"struct Receipt","name":"receipt","type":"tuple"}],"name":"verify_integrity","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60c060405234801561000f575f80fd5b5060405161118a38038061118a83398101604081905261002e9161003c565b60809190915260a05261005e565b5f806040838503121561004d575f80fd5b505080516020909101519092909150565b60805160a0516110ff61008b5f395f818160e1015261018901525f8181605e015261016301526110ff5ff3fe608060405234801561000f575f80fd5b5060043610610055575f3560e01c8063168b1146146100595780631bb8068f146100935780635fe8c13b146100b65780636efef009146100c957806386039a31146100dc575b5f80fd5b6100807f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100a66100a1366004610cdc565b610103565b604051901515815260200161008a565b6100a66100c4366004610dc6565b61021e565b6100a66100d7366004610e1d565b610788565b6100807f000000000000000000000000000000000000000000000000000000000000000081565b5f805f61011b6101168560200151610835565b610995565b915091505f845f01518060200190518101906101379190610eea565b9050306001600160a01b0316635fe8c13b825f01518360200151846040015160405180608001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000008152602001898152602001888152506040518563ffffffff1660e01b81526004016101d69493929190610fa8565b602060405180830381865afa1580156101f1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610215919061104c565b95945050505050565b5f610726565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478110610253575f805260205ff35b50565b5f60405183815284602082015285604082015260408160608360076107d05a03fa915081610286575f805260205ff35b825160408201526020830151606082015260408360808360066107d05a03fa915050806102b5575f805260205ff35b5050505050565b7f0bae4e8249e16a7a60ccd0215fbe09b3850e8c18213acdb7f3e778e83909cb5585527f295a20c060882ebb89c0339f67c0659b89ab239bfa1239943d6e73841804e11c60208601525f608086018661035887357f1b88e5dd5422d4c00bda2bc18bc9ac5aba22b30f81d6f6f68620226b984ac2667f094bd9c4b3869496bcf8ab0f733cc6b64243b5d408d09b701b16e7ddd124b17e84610256565b6103a860208801357f0f680c08630f998c5fac176e593c8c7ee279105baff2d93aeaed5a5add0ccfd67f2110dccdaf8ae02a1da45b139c06df34536f19e6826d66879420751a419c1a1084610256565b6103f860408801357f25ee06c4f9429471049948199b2973a538d9baff5425b52ce978bc88547ddc237f0e65c1c9ab69133c2e7399aa172eb5a89ccb7e7ba844a10f87c8cc729a0b3b7984610256565b61044860608801357f23fdad98b64dbcbc1866faf6f7da3d769c91699bb729c94271dc428811d95e517f0b7c7639a64cb5505831eb09e75d41862c63b1f3ec55fc432a60b989eeaad5a584610256565b50823581527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760208401357f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4703066020820152833560408201526020840135606082015260408401356080820152606084013560a08201527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e260c08201527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d192660e08201527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c6101008201527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab6101208201527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a76101408201527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec86101608201525f87015161018082015260205f018701516101a08201527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c26101c08201527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6101e08201527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b6102008201527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa610220820152843561024082015260208501356102608201527f28f15945c0d350dc79c3fa9aeae56a7c6f70a38baaa48bbda19531ac056433796102808201527f14fc776a7ce28afa94649f38f373a61f64ac984c02eee7eb8a36e68ac69edfed6102a08201527f2b135a25ce834c21818185f0779ddaf65f831d6cb941d74a6e8a10ce1b0e05616102c08201527f2f41f6b9a171433f2a2eaa0442b6cc89785eddcbd269e2a4386dbd91f6253b846102e08201526020816103008360086107d05a03fa9051169695505050505050565b604051610380810160405261073d5f840135610224565b61074a6020840135610224565b6107576040840135610224565b6107646060840135610224565b6107716080840135610224565b61077e818486888a6102bc565b9050805f5260205ff35b6040805160606020601f8801819004028201810183529181018681525f9283929182918a908a90819085018382808284375f92018290525093855250506040805160a0810182528a815260208082018b9052825180840184528581528082018690528284015260608201859052825180840190935289835282810194909452929093019260808301915061081b90610b02565b90529052905061082a81610103565b979650505050505050565b5f60028060405161085e907172697363302e52656365697074436c61696d60701b815260120190565b602060405180830381855afa158015610879573d5f803e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061089c9190611086565b606084015184516020860151608087015160408801515160189060028111156108c7576108c7611072565b60408a810151602090810151825191820199909952908101969096526060860194909452608085019290925260a084015263ffffffff909116901b60e01b6001600160e01b03191660c082015260f89190911b6001600160f81b03191660c4820152600160fa1b60c882015260ca015b60408051601f19818403018152908290526109519161109d565b602060405180830381855afa15801561096c573d5f803e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061098f9190611086565b92915050565b5f8080610ae0845f8190506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b6008827fff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0016901c1790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b6010827fffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff000016901c1790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b6020827fffffffff00000000ffffffff00000000ffffffff00000000ffffffff0000000016901c17905060408177ffffffffffffffff0000000000000000ffffffffffffffff16901b60408277ffffffffffffffff0000000000000000ffffffffffffffff1916901c179050608081901b608082901c179050919050565b6fffffffffffffffffffffffffffffffff81169560809190911c945092505050565b5f600280604051610b25906b1c9a5cd8cc0b93dd5d1c1d5d60a21b8152600c0190565b602060405180830381855afa158015610b40573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610b639190611086565b83516020808601516040805192830194909452928101919091526060810191909152600160f91b6080820152608201610937565b634e487b7160e01b5f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715610bce57610bce610b97565b60405290565b6040805190810167ffffffffffffffff81118282101715610bce57610bce610b97565b6040516060810167ffffffffffffffff81118282101715610bce57610bce610b97565b604051601f8201601f1916810167ffffffffffffffff81118282101715610c4357610c43610b97565b604052919050565b5f81830360c0811215610c5c575f80fd5b610c64610bab565b915082358252602083013560208301526040603f1982011215610c85575f80fd5b50610c8e610bd4565b604083013560038110610c9f575f80fd5b8152606083013560ff81168114610cb4575f80fd5b80602083015250806040830152506080820135606082015260a0820135608082015292915050565b5f6020808385031215610ced575f80fd5b823567ffffffffffffffff80821115610d04575f80fd5b9084019060e08287031215610d17575f80fd5b610d1f610bd4565b823582811115610d2d575f80fd5b8301601f81018813610d3d575f80fd5b803583811115610d4f57610d4f610b97565b610d61601f8201601f19168701610c1a565b93508084528886828401011115610d76575f80fd5b80868301878601375f90840186015250818152610d9587848601610c4b565b848201528094505050505092915050565b806040810183101561098f575f80fd5b806080810183101561098f575f80fd5b5f805f806101808587031215610dda575f80fd5b610de48686610da6565b9350610df38660408701610db6565b9250610e028660c08701610da6565b9150610e12866101008701610db6565b905092959194509250565b5f805f805f60808688031215610e31575f80fd5b853567ffffffffffffffff80821115610e48575f80fd5b818801915088601f830112610e5b575f80fd5b813581811115610e69575f80fd5b896020828501011115610e7a575f80fd5b60209283019a909950918801359760408101359750606001359550909350505050565b5f82601f830112610eac575f80fd5b610eb4610bd4565b806040840185811115610ec5575f80fd5b845b81811015610edf578051845260209384019301610ec7565b509095945050505050565b5f6101008284031215610efb575f80fd5b610f03610bf7565b610f0d8484610e9d565b8152604084605f850112610f1f575f80fd5b610f27610bd4565b8060c0860187811115610f38575f80fd5b604087015b81811015610f5e57610f4f8982610e9d565b84526020909301928401610f3d565b50816020860152610f6f8882610e9d565b604086015250929695505050505050565b805f5b6002811015610fa2578151845260209384019390910190600101610f83565b50505050565b6101808101610fb78287610f80565b6040808301865f5b6002808210610fce5750611008565b8251845f5b83811015610ff1578251825260209283019290910190600101610fd3565b505050928401925060209190910190600101610fbf565b5050505061101960c0830185610f80565b6101008201835f5b6004811015611040578151835260209283019290910190600101611021565b50505095945050505050565b5f6020828403121561105c575f80fd5b8151801515811461106b575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215611096575f80fd5b5051919050565b5f82515f5b818110156110bc57602081860181015185830152016110a2565b505f92019182525091905056fea2646970667358221220694afd0643933f40caa32dfa5d47f2390e615914ffe35fe71626063d426ada5964736f6c6343000818003300000000000000000000000000000000447d7e12291364db4bc54211648801290000000000000000000000000000000012c49ad247d28a32147e13615c6c81f9

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610055575f3560e01c8063168b1146146100595780631bb8068f146100935780635fe8c13b146100b65780636efef009146100c957806386039a31146100dc575b5f80fd5b6100807f00000000000000000000000000000000447d7e12291364db4bc542116488012981565b6040519081526020015b60405180910390f35b6100a66100a1366004610cdc565b610103565b604051901515815260200161008a565b6100a66100c4366004610dc6565b61021e565b6100a66100d7366004610e1d565b610788565b6100807f0000000000000000000000000000000012c49ad247d28a32147e13615c6c81f981565b5f805f61011b6101168560200151610835565b610995565b915091505f845f01518060200190518101906101379190610eea565b9050306001600160a01b0316635fe8c13b825f01518360200151846040015160405180608001604052807f00000000000000000000000000000000447d7e12291364db4bc542116488012981526020017f0000000000000000000000000000000012c49ad247d28a32147e13615c6c81f98152602001898152602001888152506040518563ffffffff1660e01b81526004016101d69493929190610fa8565b602060405180830381865afa1580156101f1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610215919061104c565b95945050505050565b5f610726565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478110610253575f805260205ff35b50565b5f60405183815284602082015285604082015260408160608360076107d05a03fa915081610286575f805260205ff35b825160408201526020830151606082015260408360808360066107d05a03fa915050806102b5575f805260205ff35b5050505050565b7f0bae4e8249e16a7a60ccd0215fbe09b3850e8c18213acdb7f3e778e83909cb5585527f295a20c060882ebb89c0339f67c0659b89ab239bfa1239943d6e73841804e11c60208601525f608086018661035887357f1b88e5dd5422d4c00bda2bc18bc9ac5aba22b30f81d6f6f68620226b984ac2667f094bd9c4b3869496bcf8ab0f733cc6b64243b5d408d09b701b16e7ddd124b17e84610256565b6103a860208801357f0f680c08630f998c5fac176e593c8c7ee279105baff2d93aeaed5a5add0ccfd67f2110dccdaf8ae02a1da45b139c06df34536f19e6826d66879420751a419c1a1084610256565b6103f860408801357f25ee06c4f9429471049948199b2973a538d9baff5425b52ce978bc88547ddc237f0e65c1c9ab69133c2e7399aa172eb5a89ccb7e7ba844a10f87c8cc729a0b3b7984610256565b61044860608801357f23fdad98b64dbcbc1866faf6f7da3d769c91699bb729c94271dc428811d95e517f0b7c7639a64cb5505831eb09e75d41862c63b1f3ec55fc432a60b989eeaad5a584610256565b50823581527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760208401357f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4703066020820152833560408201526020840135606082015260408401356080820152606084013560a08201527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e260c08201527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d192660e08201527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c6101008201527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab6101208201527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a76101408201527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec86101608201525f87015161018082015260205f018701516101a08201527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c26101c08201527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed6101e08201527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b6102008201527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa610220820152843561024082015260208501356102608201527f28f15945c0d350dc79c3fa9aeae56a7c6f70a38baaa48bbda19531ac056433796102808201527f14fc776a7ce28afa94649f38f373a61f64ac984c02eee7eb8a36e68ac69edfed6102a08201527f2b135a25ce834c21818185f0779ddaf65f831d6cb941d74a6e8a10ce1b0e05616102c08201527f2f41f6b9a171433f2a2eaa0442b6cc89785eddcbd269e2a4386dbd91f6253b846102e08201526020816103008360086107d05a03fa9051169695505050505050565b604051610380810160405261073d5f840135610224565b61074a6020840135610224565b6107576040840135610224565b6107646060840135610224565b6107716080840135610224565b61077e818486888a6102bc565b9050805f5260205ff35b6040805160606020601f8801819004028201810183529181018681525f9283929182918a908a90819085018382808284375f92018290525093855250506040805160a0810182528a815260208082018b9052825180840184528581528082018690528284015260608201859052825180840190935289835282810194909452929093019260808301915061081b90610b02565b90529052905061082a81610103565b979650505050505050565b5f60028060405161085e907172697363302e52656365697074436c61696d60701b815260120190565b602060405180830381855afa158015610879573d5f803e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061089c9190611086565b606084015184516020860151608087015160408801515160189060028111156108c7576108c7611072565b60408a810151602090810151825191820199909952908101969096526060860194909452608085019290925260a084015263ffffffff909116901b60e01b6001600160e01b03191660c082015260f89190911b6001600160f81b03191660c4820152600160fa1b60c882015260ca015b60408051601f19818403018152908290526109519161109d565b602060405180830381855afa15801561096c573d5f803e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061098f9190611086565b92915050565b5f8080610ae0845f8190506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b6008827fff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0016901c1790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b6010827fffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff000016901c1790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b6020827fffffffff00000000ffffffff00000000ffffffff00000000ffffffff0000000016901c17905060408177ffffffffffffffff0000000000000000ffffffffffffffff16901b60408277ffffffffffffffff0000000000000000ffffffffffffffff1916901c179050608081901b608082901c179050919050565b6fffffffffffffffffffffffffffffffff81169560809190911c945092505050565b5f600280604051610b25906b1c9a5cd8cc0b93dd5d1c1d5d60a21b8152600c0190565b602060405180830381855afa158015610b40573d5f803e3d5ffd5b5050506040513d601f19601f82011682018060405250810190610b639190611086565b83516020808601516040805192830194909452928101919091526060810191909152600160f91b6080820152608201610937565b634e487b7160e01b5f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715610bce57610bce610b97565b60405290565b6040805190810167ffffffffffffffff81118282101715610bce57610bce610b97565b6040516060810167ffffffffffffffff81118282101715610bce57610bce610b97565b604051601f8201601f1916810167ffffffffffffffff81118282101715610c4357610c43610b97565b604052919050565b5f81830360c0811215610c5c575f80fd5b610c64610bab565b915082358252602083013560208301526040603f1982011215610c85575f80fd5b50610c8e610bd4565b604083013560038110610c9f575f80fd5b8152606083013560ff81168114610cb4575f80fd5b80602083015250806040830152506080820135606082015260a0820135608082015292915050565b5f6020808385031215610ced575f80fd5b823567ffffffffffffffff80821115610d04575f80fd5b9084019060e08287031215610d17575f80fd5b610d1f610bd4565b823582811115610d2d575f80fd5b8301601f81018813610d3d575f80fd5b803583811115610d4f57610d4f610b97565b610d61601f8201601f19168701610c1a565b93508084528886828401011115610d76575f80fd5b80868301878601375f90840186015250818152610d9587848601610c4b565b848201528094505050505092915050565b806040810183101561098f575f80fd5b806080810183101561098f575f80fd5b5f805f806101808587031215610dda575f80fd5b610de48686610da6565b9350610df38660408701610db6565b9250610e028660c08701610da6565b9150610e12866101008701610db6565b905092959194509250565b5f805f805f60808688031215610e31575f80fd5b853567ffffffffffffffff80821115610e48575f80fd5b818801915088601f830112610e5b575f80fd5b813581811115610e69575f80fd5b896020828501011115610e7a575f80fd5b60209283019a909950918801359760408101359750606001359550909350505050565b5f82601f830112610eac575f80fd5b610eb4610bd4565b806040840185811115610ec5575f80fd5b845b81811015610edf578051845260209384019301610ec7565b509095945050505050565b5f6101008284031215610efb575f80fd5b610f03610bf7565b610f0d8484610e9d565b8152604084605f850112610f1f575f80fd5b610f27610bd4565b8060c0860187811115610f38575f80fd5b604087015b81811015610f5e57610f4f8982610e9d565b84526020909301928401610f3d565b50816020860152610f6f8882610e9d565b604086015250929695505050505050565b805f5b6002811015610fa2578151845260209384019390910190600101610f83565b50505050565b6101808101610fb78287610f80565b6040808301865f5b6002808210610fce5750611008565b8251845f5b83811015610ff1578251825260209283019290910190600101610fd3565b505050928401925060209190910190600101610fbf565b5050505061101960c0830185610f80565b6101008201835f5b6004811015611040578151835260209283019290910190600101611021565b50505095945050505050565b5f6020828403121561105c575f80fd5b8151801515811461106b575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b5f60208284031215611096575f80fd5b5051919050565b5f82515f5b818110156110bc57602081860181015185830152016110a2565b505f92019182525091905056fea2646970667358221220694afd0643933f40caa32dfa5d47f2390e615914ffe35fe71626063d426ada5964736f6c63430008180033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000447d7e12291364db4bc54211648801290000000000000000000000000000000012c49ad247d28a32147e13615c6c81f9

-----Decoded View---------------
Arg [0] : control_id_0 (uint256): 91039097843120449453449593822342807849
Arg [1] : control_id_1 (uint256): 24946934259622365010039737625873252857

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000447d7e12291364db4bc5421164880129
Arg [1] : 0000000000000000000000000000000012c49ad247d28a32147e13615c6c81f9


Deployed Bytecode Sourcemap

3078:2441:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3803:37;;;;;;;;160:25:5;;;148:2;133:18;3803:37:3;;;;;;;;5189:328;;;;;;:::i;:::-;;:::i;:::-;;;3557:14:5;;3550:22;3532:41;;3520:2;3505:18;5189:328:3;3392:187:5;3869:4268:1;;;;;;:::i;:::-;;:::i;4631:514:3:-;;;;;;:::i;:::-;;:::i;3846:37::-;;;;;5189:328;5260:4;5277:14;5293;5311:35;5323:22;:7;:13;;;:20;:22::i;:::-;5311:11;:35::i;:::-;5276:70;;;;5356:16;5386:7;:12;;;5375:32;;;;;;;;;;;;:::i;:::-;5356:51;;5424:4;-1:-1:-1;;;;;5424:16:3;;5441:4;:6;;;5449:4;:6;;;5457:4;:6;;;5424:86;;;;;;;;5466:12;5424:86;;;;5480:12;5424:86;;;;5494:6;5424:86;;;;5502:6;5424:86;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5417:93;5189:328;-1:-1:-1;;;;;5189:328:3: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;4631:514:3;4823:273;;;;;;;;;;;;;;;;;;;;;;;;4778:4;;;;4823:273;;;4844:4;;;;;;4823:273;;4844:4;;;;4823:273;;;;;;;;-1:-1:-1;4823:273:3;;;-1:-1:-1;;4862:224:3;;;;;;;;;;;4823:273;4862:224;;;;;;4950:34;;;;;;;;;;;;;;;;4862:224;;;;;;;;;;5030:33;;;;;;;;;;;;;;;;;;4823:273;;;;;4862:224;;;;-1:-1:-1;5030:42:3;;:40;:42::i;:::-;4862:224;;4823:273;;4798:298;-1:-1:-1;5113:25:3;4798:298;5113:16;:25::i;:::-;5106:32;4631:514;-1:-1:-1;;;;;;;4631:514:3:o;1739:538:2:-;1805:7;1831:439;1704:28;;;;;-1:-1:-1;;;9394:33:5;;9452:2;9443:12;;9193:268;1704:28:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1937:11;;;;1966:20;;2004:21;;;;2043:12;;;;2104:14;;;;:21;2130:2;;2097:29;;;;;;;;:::i;:::-;2157:14;;;;;:19;;;;;1851:409;;;;;9974:19:5;;;;10009:12;;;10002:28;;;;10046:12;;;10039:28;;;;10083:12;;;10076:28;;;;10120:13;;;10113:29;2097:35:2;;;;;;10165:3:5;10216:16;-1:-1:-1;;;;;;10212:25:5;10197:13;;;10190:48;10273:16;;;;;-1:-1:-1;;;;;;10273:16:5;10254:13;;;10247:48;-1:-1:-1;;;10311:13:5;;;10304:61;10381:13;;1851:409:2;;;;-1:-1:-1;;1851:409:2;;;;;;;;;;1831:439;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1824:446;1739:538;-1:-1:-1;;1739:538:2:o;4353:234:3:-;4413:7;;;4460:40;4492:6;1443:9;1464:5;1460:9;;1665:1;1590;1594:66;1590:70;1589:77;;1575:1;1500;1504:66;1500:70;1499:77;;1498:169;1494:173;;1876:2;1801:1;1805:66;1801:70;1800:78;;1785:2;1710:1;1714:66;1710:70;1709:78;;1708:171;1704:175;;2088:2;2013:1;2017:66;2013:70;2012:78;;1997:2;1922:1;1926:66;1922:70;1921:78;;1920:171;1916:175;;2300:2;2225:1;2229:66;2225:70;2224:78;;2209:2;2134:1;-1:-1:-1;;2134:70:3;2133:78;;2132:171;2128:175;;2364:3;2359:1;:8;;2351:3;2346:1;:8;;2345:23;2341:27;;1381:990;;;;4460:40;4518:35;;;;4575:3;4563:15;;;;;-1:-1:-1;4353:234:3;-1:-1:-1;;;4353:234:3:o;4744:349:2:-;4805:7;4831:255;4715:22;;;;;-1:-1:-1;;;11023:27:5;;11075:2;11066:12;;10822:262;4715:22:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4937:20;;4975:24;;;;;4851:225;;;;;;11300:19:5;;;;11335:12;;;11328:28;;;;11372:12;;;11365:28;;;;-1:-1:-1;;;11409:12:5;;;11402:60;11478:12;;4851:225:2;11089:407:5;196:127;257:10;252:3;248:20;245:1;238:31;288:4;285:1;278:15;312:4;309:1;302:15;328:253;400:2;394:9;442:4;430:17;;477:18;462:34;;498:22;;;459:62;456:88;;;524:18;;:::i;:::-;560:2;553:22;328:253;:::o;586:251::-;658:2;652:9;;;688:15;;733:18;718:34;;754:22;;;715:62;712:88;;;780:18;;:::i;842:253::-;914:2;908:9;956:4;944:17;;991:18;976:34;;1012:22;;;973:62;970:88;;;1038:18;;:::i;1100:275::-;1171:2;1165:9;1236:2;1217:13;;-1:-1:-1;;1213:27:5;1201:40;;1271:18;1256:34;;1292:22;;;1253:62;1250:88;;;1318:18;;:::i;:::-;1354:2;1347:22;1100:275;;-1:-1:-1;1100:275:5:o;1380:888::-;1439:5;1478:9;1473:3;1469:19;1508:4;1504:2;1500:13;1497:33;;;1526:1;1523;1516:12;1497:33;1548:22;;:::i;:::-;1539:31;;1606:9;1593:23;1586:5;1579:38;1677:2;1666:9;1662:18;1649:32;1644:2;1637:5;1633:14;1626:56;1716:2;1710;1706:7;1702:2;1698:16;1694:25;1691:45;;;1732:1;1729;1722:12;1691:45;;1760:22;;:::i;:::-;1834:2;1823:9;1819:18;1806:32;1869:1;1860:7;1857:14;1847:42;;1885:1;1882;1875:12;1847:42;1898:24;;1974:2;1959:18;;1946:32;2022:4;2009:18;;1997:31;;1987:59;;2042:1;2039;2032:12;1987:59;2080:7;2075:2;2066:7;2062:16;2055:33;;2120:7;2115:2;2108:5;2104:14;2097:31;;2188:3;2177:9;2173:19;2160:33;2155:2;2148:5;2144:14;2137:57;2255:4;2244:9;2240:20;2227:34;2221:3;2214:5;2210:15;2203:59;1380:888;;;;:::o;2273:1114::-;2356:6;2387:2;2430;2418:9;2409:7;2405:23;2401:32;2398:52;;;2446:1;2443;2436:12;2398:52;2486:9;2473:23;2515:18;2556:2;2548:6;2545:14;2542:34;;;2572:1;2569;2562:12;2542:34;2595:22;;;;2651:4;2633:16;;;2629:27;2626:47;;;2669:1;2666;2659:12;2626:47;2695:22;;:::i;:::-;2755:2;2742:16;2783:2;2773:8;2770:16;2767:36;;;2799:1;2796;2789:12;2767:36;2822:17;;2870:4;2862:13;;2858:27;-1:-1:-1;2848:55:5;;2899:1;2896;2889:12;2848:55;2935:2;2922:16;2957:2;2953;2950:10;2947:36;;;2963:18;;:::i;:::-;3005:53;3048:2;3029:13;;-1:-1:-1;;3025:27:5;3021:36;;3005:53;:::i;:::-;2992:66;;3081:2;3074:5;3067:17;3121:7;3116:2;3111;3107;3103:11;3099:20;3096:33;3093:53;;;3142:1;3139;3132:12;3093:53;3197:2;3192;3188;3184:11;3179:2;3172:5;3168:14;3155:45;3241:1;3220:14;;;3216:23;;3209:34;-1:-1:-1;3252:20:5;;;3304:52;3348:7;3335:11;;;3304:52;:::i;:::-;3299:2;3292:5;3288:14;3281:76;3376:5;3366:15;;;;;;2273:1114;;;;:::o;3584:159::-;3678:6;3711:2;3699:15;;3696:24;-1:-1:-1;3693:44:5;;;3733:1;3730;3723:12;3748:175;3857:6;3890:3;3878:16;;3875:25;-1:-1:-1;3872:45:5;;;3913:1;3910;3903:12;3928:662;4139:6;4147;4155;4163;4216:3;4204:9;4195:7;4191:23;4187:33;4184:53;;;4233:1;4230;4223:12;4184:53;4256;4301:7;4290:9;4256:53;:::i;:::-;4246:63;;4328:77;4397:7;4392:2;4381:9;4377:18;4328:77;:::i;:::-;4318:87;;4424:63;4479:7;4473:3;4462:9;4458:19;4424:63;:::i;:::-;4414:73;;4506:78;4576:7;4570:3;4559:9;4555:19;4506:78;:::i;:::-;4496:88;;3928:662;;;;;;;:::o;4595:802::-;4692:6;4700;4708;4716;4724;4777:3;4765:9;4756:7;4752:23;4748:33;4745:53;;;4794:1;4791;4784:12;4745:53;4834:9;4821:23;4863:18;4904:2;4896:6;4893:14;4890:34;;;4920:1;4917;4910:12;4890:34;4958:6;4947:9;4943:22;4933:32;;5003:7;4996:4;4992:2;4988:13;4984:27;4974:55;;5025:1;5022;5015:12;4974:55;5065:2;5052:16;5091:2;5083:6;5080:14;5077:34;;;5107:1;5104;5097:12;5077:34;5154:7;5147:4;5138:6;5134:2;5130:15;5126:26;5123:39;5120:59;;;5175:1;5172;5165:12;5120:59;5206:4;5198:13;;;;5230:6;;-1:-1:-1;5268:20:5;;;5255:34;;5336:2;5321:18;;5308:32;;-1:-1:-1;5387:2:5;5372:18;5359:32;;-1:-1:-1;4595:802:5;;-1:-1:-1;;;;4595:802:5:o;5402:488::-;5463:5;5516:3;5509:4;5501:6;5497:17;5493:27;5483:55;;5534:1;5531;5524:12;5483:55;5558:22;;:::i;:::-;5602:3;5640:2;5632:6;5628:15;5666:3;5658:6;5655:15;5652:35;;;5683:1;5680;5673:12;5652:35;5707:6;5722:139;5738:6;5733:3;5730:15;5722:139;;;5806:10;;5794:23;;5846:4;5837:14;;;;5755;5722:139;;;-1:-1:-1;5879:5:5;;5402:488;-1:-1:-1;;;;;5402:488:5:o;5895:913::-;5986:6;6039:3;6027:9;6018:7;6014:23;6010:33;6007:53;;;6056:1;6053;6046:12;6007:53;6082:22;;:::i;:::-;6127:55;6174:7;6163:9;6127:55;:::i;:::-;6120:5;6113:70;6202:2;6247:7;6242:2;6231:9;6227:18;6223:32;6213:60;;6269:1;6266;6259:12;6213:60;6293:22;;:::i;:::-;6337:3;6378;6367:9;6363:19;6405:7;6397:6;6394:19;6391:39;;;6426:1;6423;6416:12;6391:39;6465:2;6454:9;6450:18;6477:176;6493:6;6488:3;6485:15;6477:176;;;6559:49;6600:7;6595:3;6559:49;:::i;:::-;6547:62;;6638:4;6629:14;;;;6510:12;;6477:176;;;6481:3;6687:5;6680:4;6673:5;6669:16;6662:31;6725:52;6769:7;6761:6;6725:52;:::i;:::-;6720:2;6709:14;;6702:76;-1:-1:-1;6713:5:5;;5895:913;-1:-1:-1;;;;;;5895:913:5:o;6813:326::-;6906:5;6929:1;6939:194;6953:4;6950:1;6947:11;6939:194;;;7012:13;;7000:26;;7049:4;7073:12;;;;7108:15;;;;6973:1;6966:9;6939:194;;;6943:3;;6813:326;;:::o;7144:1630::-;7592:3;7577:19;;7605:43;7581:9;7630:6;7605:43;:::i;:::-;7667:2;7704;7693:9;7689:18;7749:6;7773:1;7783:586;7847:4;7880:2;7877:1;7874:9;7864:30;;7887:5;;;7864:30;7917:13;;7956:3;8039:1;8053:234;8069:2;8064:3;8061:11;8053:234;;;8140:15;;8126:30;;8183:4;8256:17;;;;8213:14;;;;8091:1;8082:11;8053:234;;;-1:-1:-1;;;8307:12:5;;;;-1:-1:-1;8354:4:5;8342:17;;;;;7810:1;7803:9;7783:586;;;7787:3;;;;8378:53;8426:3;8415:9;8411:19;8403:6;8378:53;:::i;:::-;8468:3;8457:9;8453:19;8520:6;8546:1;8556:212;8572:4;8567:3;8564:13;8556:212;;;8637:15;;8623:30;;8676:4;8702:14;;;;8741:17;;;;8596:1;8587:11;8556:212;;;8560:3;;;7144:1630;;;;;;;:::o;8779:277::-;8846:6;8899:2;8887:9;8878:7;8874:23;8870:32;8867:52;;;8915:1;8912;8905:12;8867:52;8947:9;8941:16;9000:5;8993:13;8986:21;8979:5;8976:32;8966:60;;9022:1;9019;9012:12;8966:60;9045:5;8779:277;-1:-1:-1;;;8779:277:5:o;9061:127::-;9122:10;9117:3;9113:20;9110:1;9103:31;9153:4;9150:1;9143:15;9177:4;9174:1;9167:15;9466:184;9536:6;9589:2;9577:9;9568:7;9564:23;9560:32;9557:52;;;9605:1;9602;9595:12;9557:52;-1:-1:-1;9628:16:5;;9466:184;-1:-1:-1;9466:184:5:o;10405:412::-;10534:3;10572:6;10566:13;10597:1;10607:129;10621:6;10618:1;10615:13;10607:129;;;10719:4;10703:14;;;10699:25;;10693:32;10680:11;;;10673:53;10636:12;10607:129;;;-1:-1:-1;10791:1:5;10755:16;;10780:13;;;-1:-1:-1;10755:16:5;10405:412;-1:-1:-1;10405:412:5:o

Swarm Source

ipfs://694afd0643933f40caa32dfa5d47f2390e615914ffe35fe71626063d426ada59

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.