Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0x5380d2bD50Fd183B0d5D24888e05Dfd4DD7D7e4d
Balance 0 ETH
Nonce 1
Code Size 7082 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

7082 bytes
0x608060405234801561000f575f5ffd5b50600436106101cc575f3560e01c80636e553f6511610101578063b460af941161009a578063b460af941461044e578063ba08765214610461578063c63d75b6146102d8578063c6e6f59214610474578063ce96cb7714610487578063d905777e1461049a578063dd62ed3e146104ad578063ef8b30f714610474578063f2638fa0146104c0575f5ffd5b80636e553f651461038657806370a08231146103995780637d5e81e2146103ac5780638da5cb5b146103bf57806394bf804d146103e657806395d89b41146103f9578063a9059cbb14610401578063af640d0f14610414578063b3d7f6b91461043b575f5ffd5b8063313ce56711610173578063313ce5671461029857806338d52e0f146102b2578063402d267d146102d857806345152ae3146102eb578063452115d6146103125780634cdad506146102005780634cf088d914610325578063567813881461034c5780636b4a5b8f1461035f575f5ffd5b806301e1d114146101d057806306fdde03146101eb57806307a2d13a14610200578063095ea7b3146102135780630a28a477146102365780630c340a241461024957806318160ddd1461027d57806323b872dd14610285575b5f5ffd5b6101d86104d5565b6040519081526020015b60405180910390f35b6101f3610567565b6040516101e29190611309565b6101d861020e36600461131b565b6105f7565b61022661022136600461134d565b610608565b60405190151581526020016101e2565b6101d861024436600461131b565b61061f565b6102707f00000000000000000000000028b072469ac7c865eca3f2846cd00b3b195d18a581565b6040516101e29190611375565b6002546101d8565b610226610293366004611389565b61062b565b6102a0610650565b60405160ff90911681526020016101e2565b7f00000000000000000000000004ece2a2c3ea68356274f37c096258c7a9e72fa1610270565b6101d86102e63660046113c3565b61067b565b6102707f0000000000000000000000006bef15d938d4e72056ac92ea4bdd0d76b1c4ad2981565b6101d86103203660046115f7565b610681565b6102707f00000000000000000000000059a2d7b0421ba13f57bf012f46c58ab5a65b1d3c81565b6101d861035a36600461168a565b610766565b6101d87f00000000000000000000000000000000000000000000000000000000000000c881565b6101d86103943660046116bd565b610841565b6101d86103a73660046113c3565b61089e565b6101d86103ba3660046116e7565b6108b8565b6102707f000000000000000000000000b7fc279dccc43a2bfa684e4b5d36000007fe4d0881565b6101d86103f43660046116bd565b610954565b6101f36109a0565b61022661040f36600461134d565b6109af565b6101d87f000000000000000000000000000000000000000000000000000000000000002b81565b6101d861044936600461131b565b6109bc565b6101d861045c3660046117af565b6109c8565b6101d861046f3660046117af565b610a15565b6101d861048236600461131b565b610a62565b6101d86104953660046113c3565b610a6d565b6101d86104a83660046113c3565b610a80565b6101d86104bb3660046117e8565b610a8a565b6104d36104ce36600461134d565b610ab4565b005b6040516370a0823160e01b81525f906001600160a01b037f00000000000000000000000004ece2a2c3ea68356274f37c096258c7a9e72fa116906370a0823190610523903090600401611375565b602060405180830381865afa15801561053e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105629190611810565b905090565b60606003805461057690611827565b80601f01602080910402602001604051908101604052809291908181526020018280546105a290611827565b80156105ed5780601f106105c4576101008083540402835291602001916105ed565b820191905f5260205f20905b8154815290600101906020018083116105d057829003601f168201915b5050505050905090565b5f610602825f610b56565b92915050565b5f33610615818585610b8e565b5060019392505050565b5f610602826001610ba0565b5f33610638858285610bcf565b610643858585610c18565b60019150505b9392505050565b5f610562817f0000000000000000000000000000000000000000000000000000000000000012611873565b505f1990565b5f336001600160a01b037f000000000000000000000000b7fc279dccc43a2bfa684e4b5d36000007fe4d0816146106cb57604051636bae83cd60e01b815260040160405180910390fd5b6040516322908aeb60e11b81526001600160a01b037f00000000000000000000000028b072469ac7c865eca3f2846cd00b3b195d18a5169063452115d69061071d908890889088908890600401611959565b6020604051808303815f875af1158015610739573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075d9190611810565b95945050505050565b5f336001600160a01b037f000000000000000000000000b7fc279dccc43a2bfa684e4b5d36000007fe4d0816146107b057604051636bae83cd60e01b815260040160405180910390fd5b604051630acf027160e31b81526004810184905260ff831660248201527f00000000000000000000000028b072469ac7c865eca3f2846cd00b3b195d18a56001600160a01b0316906356781388906044016020604051808303815f875af115801561081d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106499190611810565b5f5f61084c8361067b565b90508084111561087e57828482604051633c8097d960e11b8152600401610875939291906119a3565b60405180910390fd5b5f61088885610a62565b905061089633858784610c75565b949350505050565b6001600160a01b03165f9081526020819052604090205490565b5f336001600160a01b037f000000000000000000000000b7fc279dccc43a2bfa684e4b5d36000007fe4d08161461090257604051636bae83cd60e01b815260040160405180910390fd5b604051633eaf40f160e11b81526001600160a01b037f00000000000000000000000028b072469ac7c865eca3f2846cd00b3b195d18a51690637d5e81e29061071d9088908890889088906004016119c4565b5f5f61095f8361067b565b9050808411156109885782848260405163284ff66760e01b8152600401610875939291906119a3565b5f610992856109bc565b905061089633858388610c75565b60606004805461057690611827565b5f33610615818585610c18565b5f610602826001610b56565b5f5f6109d383610a6d565b9050808511156109fc57828582604051633fa733bb60e21b8152600401610875939291906119a3565b5f610a068661061f565b905061075d3386868985610d07565b5f5f610a2083610a80565b905080851115610a4957828582604051632e52afbb60e21b8152600401610875939291906119a3565b5f610a53866105f7565b905061075d338686848a610d07565b5f610602825f610ba0565b5f610602610a7a8361089e565b5f610b56565b5f6106028261089e565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b336001600160a01b037f00000000000000000000000059a2d7b0421ba13f57bf012f46c58ab5a65b1d3c1614610afd57604051634487f62960e11b815260040160405180910390fd5b610b526001600160a01b037f0000000000000000000000006bef15d938d4e72056ac92ea4bdd0d76b1c4ad2916837f00000000000000000000000059a2d7b0421ba13f57bf012f46c58ab5a65b1d3c84610dc7565b5050565b5f610649610b626104d5565b610b6d906001611a1b565b610b785f600a611b11565b600254610b859190611a1b565b85919085610e34565b610b9b8383836001610e76565b505050565b5f610649610baf82600a611b11565b600254610bbc9190611a1b565b610bc46104d5565b610b85906001611a1b565b7f00000000000000000000000059a2d7b0421ba13f57bf012f46c58ab5a65b1d3c6001600160a01b0316826001600160a01b031603610c0d57505050565b610b9b838383610f3a565b6001600160a01b038316610c41575f604051634b637e8f60e11b81526004016108759190611375565b6001600160a01b038216610c6a575f60405163ec442f0560e01b81526004016108759190611375565b610b9b838383610f85565b610ca17f00000000000000000000000004ece2a2c3ea68356274f37c096258c7a9e72fa1853085610dc7565b610cab8382610fd9565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d78484604051610cf9929190918252602082015260400190565b60405180910390a350505050565b826001600160a01b0316856001600160a01b031614610d2b57610d2b838683610bcf565b610d35838261100d565b610d607f00000000000000000000000004ece2a2c3ea68356274f37c096258c7a9e72fa18584611041565b826001600160a01b0316846001600160a01b0316866001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8585604051610db8929190918252602082015260400190565b60405180910390a45050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610e2e9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611072565b50505050565b5f610e61610e41836110d5565b8015610e5c57505f8480610e5757610e57611b1f565b868809115b151590565b610e6c868686611101565b61075d9190611a1b565b6001600160a01b038416610e9f575f60405163e602df0560e01b81526004016108759190611375565b6001600160a01b038316610ec8575f604051634a1406b160e11b81526004016108759190611375565b6001600160a01b038085165f9081526001602090815260408083209387168352929052208290558015610e2e57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610cf991815260200190565b5f610f458484610a8a565b90505f19811015610e2e5781811015610f7757828183604051637dc7a0d960e11b8152600401610875939291906119a3565b610e2e84848484035f610e76565b336001600160a01b037f00000000000000000000000059a2d7b0421ba13f57bf012f46c58ab5a65b1d3c1614610fce57604051639cbe235760e01b815260040160405180910390fd5b610b9b8383836111b7565b6001600160a01b038216611002575f60405163ec442f0560e01b81526004016108759190611375565b610b525f8383610f85565b6001600160a01b038216611036575f604051634b637e8f60e11b81526004016108759190611375565b610b52825f83610f85565b6040516001600160a01b03838116602483015260448201839052610b9b91859182169063a9059cbb90606401610dfc565b5f5f60205f8451602086015f885af180611091576040513d5f823e3d81fd5b50505f513d915081156110a85780600114156110b5565b6001600160a01b0384163b155b15610e2e5783604051635274afe760e01b81526004016108759190611375565b5f60028260038111156110ea576110ea611b33565b6110f49190611b47565b60ff166001149050919050565b5f838302815f1985870982811083820303915050805f036111355783828161112b5761112b611b1f565b0492505050610649565b80841161114c5761114c60038515026011186112ca565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6001600160a01b0383166111e1578060025f8282546111d69190611a1b565b9091555061123e9050565b6001600160a01b0383165f90815260208190526040902054818110156112205783818360405163391434e360e21b8152600401610875939291906119a3565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b03821661125a57600280548290039055611278565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112bd91815260200190565b60405180910390a3505050565b634e487b715f52806020526024601cfd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61064960208301846112db565b5f6020828403121561132b575f5ffd5b5035919050565b80356001600160a01b0381168114611348575f5ffd5b919050565b5f5f6040838503121561135e575f5ffd5b61136783611332565b946020939093013593505050565b6001600160a01b0391909116815260200190565b5f5f5f6060848603121561139b575f5ffd5b6113a484611332565b92506113b260208501611332565b929592945050506040919091013590565b5f602082840312156113d3575f5ffd5b61064982611332565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715611418576114186113dc565b604052919050565b5f6001600160401b03821115611438576114386113dc565b5060051b60200190565b5f82601f830112611451575f5ffd5b813561146461145f82611420565b6113f0565b8082825260208201915060208360051b860101925085831115611485575f5ffd5b602085015b838110156114a95761149b81611332565b83526020928301920161148a565b5095945050505050565b5f82601f8301126114c2575f5ffd5b81356114d061145f82611420565b8082825260208201915060208360051b8601019250858311156114f1575f5ffd5b602085015b838110156114a95780358352602092830192016114f6565b5f5f6001600160401b03841115611527576115276113dc565b50601f8301601f191660200161153c816113f0565b915050828152838383011115611550575f5ffd5b828260208301375f602084830101529392505050565b5f82601f830112611575575f5ffd5b813561158361145f82611420565b8082825260208201915060208360051b8601019250858311156115a4575f5ffd5b602085015b838110156114a95780356001600160401b038111156115c6575f5ffd5b8601603f810188136115d6575f5ffd5b6115e88860208301356040840161150e565b845250602092830192016115a9565b5f5f5f5f6080858703121561160a575f5ffd5b84356001600160401b0381111561161f575f5ffd5b61162b87828801611442565b94505060208501356001600160401b03811115611646575f5ffd5b611652878288016114b3565b93505060408501356001600160401b0381111561166d575f5ffd5b61167987828801611566565b949793965093946060013593505050565b5f5f6040838503121561169b575f5ffd5b82359150602083013560ff811681146116b2575f5ffd5b809150509250929050565b5f5f604083850312156116ce575f5ffd5b823591506116de60208401611332565b90509250929050565b5f5f5f5f608085870312156116fa575f5ffd5b84356001600160401b0381111561170f575f5ffd5b61171b87828801611442565b94505060208501356001600160401b03811115611736575f5ffd5b611742878288016114b3565b93505060408501356001600160401b0381111561175d575f5ffd5b61176987828801611566565b92505060608501356001600160401b03811115611784575f5ffd5b8501601f81018713611794575f5ffd5b6117a38782356020840161150e565b91505092959194509250565b5f5f5f606084860312156117c1575f5ffd5b833592506117d160208501611332565b91506117df60408501611332565b90509250925092565b5f5f604083850312156117f9575f5ffd5b61180283611332565b91506116de60208401611332565b5f60208284031215611820575f5ffd5b5051919050565b600181811c9082168061183b57607f821691505b60208210810361185957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b60ff81811683821601908111156106025761060261185f565b5f8151808452602084019350602083015f5b828110156118c55781516001600160a01b031686526020958601959091019060010161189e565b5093949350505050565b5f8151808452602084019350602083015f5b828110156118c55781518652602095860195909101906001016118e1565b5f82825180855260208501945060208160051b830101602085015f5b8381101561194d57601f198584030188526119378383516112db565b602098890198909350919091019060010161191b565b50909695505050505050565b608081525f61196b608083018761188c565b828103602084015261197d81876118cf565b9050828103604084015261199181866118ff565b91505082606083015295945050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b608081525f6119d6608083018761188c565b82810360208401526119e881876118cf565b905082810360408401526119fc81866118ff565b90508281036060840152611a1081856112db565b979650505050505050565b808201808211156106025761060261185f565b6001815b6001841115611a6957808504811115611a4d57611a4d61185f565b6001841615611a5b57908102905b60019390931c928002611a32565b935093915050565b5f82611a7f57506001610602565b81611a8b57505f610602565b8160018114611aa15760028114611aab57611ac7565b6001915050610602565b60ff841115611abc57611abc61185f565b50506001821b610602565b5060208310610133831016604e8410600b8410161715611aea575081810a610602565b611af65f198484611a2e565b805f1904821115611b0957611b0961185f565b029392505050565b5f61064960ff841683611a71565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b5f60ff831680611b6557634e487b7160e01b5f52601260045260245ffd5b8060ff8416069150509291505056fea2646970667358221220a50ee45cb9da54b8b9532d45d63a6981b6b7fa8f38ba5f78c3afc7eac129093464736f6c634300081c0033

Verified Source Code Partial Match

Compiler: v0.8.28+commit.7893614a EVM: cancun Optimization: Yes (100 runs)
SuccinctProver.sol 6398 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20 ^0.8.28;

// lib/openzeppelin-contracts/contracts/utils/Context.sol

// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(
        bytes32 hash,
        bytes memory signature
    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly ("memory-safe") {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

// lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol

// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)

interface IERC5267 {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

// lib/openzeppelin-contracts/contracts/interfaces/IERC6372.sol

// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol)

interface IERC6372 {
    /**
     * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
     */
    function clock() external view returns (uint48);

    /**
     * @dev Description of the clock
     */
    // solhint-disable-next-line func-name-mixedcase
    function CLOCK_MODE() external view returns (string memory);
}

// src/interfaces/IProver.sol

interface IProver {
    /// @dev Thrown when a zero address is provided.
    error ZeroAddress();

    /// @dev Thrown when the caller is not the prover owner.
    error NotProverOwner();

    /// @dev Thrown when the caller is not the staking contract.
    error NotStaking();

    /// @dev Thrown when a transfer is attempted.
    error NonTransferable();

    /// @notice The staking contract that corresponding to this prover.
    /// @dev This address cannot be changed.
    /// @return The address of the staking contract.
    function staking() external view returns (address);

    /// @notice The governor used in protocol governance.
    /// @dev This address cannot be changed.
    /// @return The address of the governor contract.
    function governor() external view returns (address);

    /// @notice The $PROVE token
    /// @dev This address cannot be changed.
    /// @return The address of the $PROVE token.
    function prove() external view returns (address);

    /// @notice The owner of this prover. The owner was the address that created this prover by
    ///         calling `createProver()` on the staking contract. The owner has control over
    ///         particpiation in governance, collection of prover owner rewards, and the signing
    ///         rights of verifiable prover network actions such as bidding and fulfilling proofs.
    /// @dev This address cannot be changed.
    /// @return The address of the prover owner.
    function owner() external view returns (address);

    /// @notice The ID of this prover. IDs are assigned sequentially, incrementing
    ///         each time a prover is created.
    /// @dev This is purely for informational purposes. This ID cannot be changed.
    /// @return The ID of the prover.
    function id() external view returns (uint256);

    /// @notice The staker fee percentage in basis points (one-hundredth of a percent). For a
    ///         given $PROVE reward for fulfilling proofs, this much goes into this prover.
    /// @dev This fee cannot be changed.
    /// @return The staker fee percentage in basis points.
    function stakerFeeBips() external view returns (uint256);

    /// @notice Create a governance proposal. Only callable by the prover owner.
    /// @dev This function is a wrapper around `IGovernor.propose`.
    /// @param targets The addresses of the contracts to call.
    /// @param values The amounts of ETH to send.
    /// @param calldatas The calldata for each call.
    /// @param description The proposal description.
    /// @return The proposal ID.
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) external returns (uint256);

    /// @notice Cancel a governance proposal. Only callable by the prover owner.
    /// @dev This function is a wrapper around `IGovernor.cancel`.
    /// @param targets The addresses of the contracts to call.
    /// @param values The amounts of ETH to send.
    /// @param calldatas The calldata for each call.
    /// @param descriptionHash The hash of the proposal description.
    /// @return The proposal ID.
    function cancel(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) external returns (uint256);

    /// @notice Cast a vote on a governance proposal. Only callable by the prover owner.
    /// @dev This function is a wrapper around `IGovernor.castVote`.
    /// @param proposalId The ID of the proposal.
    /// @param support The vote type (0 = Against, 1 = For, 2 = Abstain).
    /// @return The voting weight used.
    function castVote(uint256 proposalId, uint8 support) external returns (uint256);

    /// @notice Transfer $PROVE to the staking contract. Only callable by the staking contract.
    /// @dev Since in `SuccinctStaking.permitAndStake()`, the staker approves the prover to spend $PROVE, the
    ///      staking contract needs to transfer the $PROVE utilizing this contract as the spender.
    /// @param from The address to transfer $PROVE from.
    /// @param amount The amount of $PROVE to transfer.
    function transferProveToStaking(address from, uint256 amount) external;
}

// lib/openzeppelin-contracts/contracts/governance/utils/IVotes.sol

// OpenZeppelin Contracts (last updated v5.0.0) (governance/utils/IVotes.sol)

/**
 * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.
 */
interface IVotes {
    /**
     * @dev The signature used has expired.
     */
    error VotesExpiredSignature(uint256 expiry);

    /**
     * @dev Emitted when an account changes their delegate.
     */
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /**
     * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of voting units.
     */
    event DelegateVotesChanged(address indexed delegate, uint256 previousVotes, uint256 newVotes);

    /**
     * @dev Returns the current amount of votes that `account` has.
     */
    function getVotes(address account) external view returns (uint256);

    /**
     * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is
     * configured to use block numbers, this will return the value at the end of the corresponding block.
     */
    function getPastVotes(address account, uint256 timepoint) external view returns (uint256);

    /**
     * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is
     * configured to use block numbers, this will return the value at the end of the corresponding block.
     *
     * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
     * Votes that have not been delegated are still part of total supply, even though they would not participate in a
     * vote.
     */
    function getPastTotalSupply(uint256 timepoint) external view returns (uint256);

    /**
     * @dev Returns the delegate that `account` has chosen.
     */
    function delegates(address account) external view returns (address);

    /**
     * @dev Delegates votes from the sender to `delegatee`.
     */
    function delegate(address delegatee) external;

    /**
     * @dev Delegates votes from signer to `delegatee`.
     */
    function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external;
}

// lib/openzeppelin-contracts/contracts/utils/Nonces.sol

// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)

/**
 * @dev Provides tracking nonces for addresses. Nonces will only increment.
 */
abstract contract Nonces {
    /**
     * @dev The nonce used for an `account` is not the expected current nonce.
     */
    error InvalidAccountNonce(address account, uint256 currentNonce);

    mapping(address account => uint256) private _nonces;

    /**
     * @dev Returns the next unused nonce for an address.
     */
    function nonces(address owner) public view virtual returns (uint256) {
        return _nonces[owner];
    }

    /**
     * @dev Consumes a nonce.
     *
     * Returns the current value and increments nonce.
     */
    function _useNonce(address owner) internal virtual returns (uint256) {
        // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be
        // decremented or reset. This guarantees that the nonce never overflows.
        unchecked {
            // It is important to do x++ and not ++x here.
            return _nonces[owner]++;
        }
    }

    /**
     * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
     */
    function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
        uint256 current = _useNonce(owner);
        if (nonce != current) {
            revert InvalidAccountNonce(owner, current);
        }
    }
}

// lib/openzeppelin-contracts/contracts/utils/Panic.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)

/**
 * @dev Helper library for emitting standardized panic codes.
 *
 * ```solidity
 * contract Example {
 *      using Panic for uint256;
 *
 *      // Use any of the declared internal constants
 *      function foo() { Panic.GENERIC.panic(); }
 *
 *      // Alternatively
 *      function foo() { Panic.panic(Panic.GENERIC); }
 * }
 * ```
 *
 * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
 *
 * _Available since v5.1._
 */
// slither-disable-next-line unused-state
library Panic {
    /// @dev generic / unspecified error
    uint256 internal constant GENERIC = 0x00;
    /// @dev used by the assert() builtin
    uint256 internal constant ASSERT = 0x01;
    /// @dev arithmetic underflow or overflow
    uint256 internal constant UNDER_OVERFLOW = 0x11;
    /// @dev division or modulo by zero
    uint256 internal constant DIVISION_BY_ZERO = 0x12;
    /// @dev enum conversion error
    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;
    /// @dev invalid encoding in storage
    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;
    /// @dev empty array pop
    uint256 internal constant EMPTY_ARRAY_POP = 0x31;
    /// @dev array out of bounds access
    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
    /// @dev resource error (too large allocation or too large array)
    uint256 internal constant RESOURCE_ERROR = 0x41;
    /// @dev calling invalid internal function
    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;

    /// @dev Reverts with a panic code. Recommended to use with
    /// the internal constants with predefined codes.
    function panic(uint256 code) internal pure {
        assembly ("memory-safe") {
            mstore(0x00, 0x4e487b71)
            mstore(0x20, code)
            revert(0x1c, 0x24)
        }
    }
}

// lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol

// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

/**
 * @dev Wrappers over Solidity's uintXX/intXX/bool 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...

// [truncated — 246534 bytes total]

Read Contract

allowance 0xdd62ed3e → uint256
asset 0x38d52e0f → address
balanceOf 0x70a08231 → uint256
convertToAssets 0x07a2d13a → uint256
convertToShares 0xc6e6f592 → uint256
decimals 0x313ce567 → uint8
governor 0x0c340a24 → address
id 0xaf640d0f → uint256
maxDeposit 0x402d267d → uint256
maxMint 0xc63d75b6 → uint256
maxRedeem 0xd905777e → uint256
maxWithdraw 0xce96cb77 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
previewDeposit 0xef8b30f7 → uint256
previewMint 0xb3d7f6b9 → uint256
previewRedeem 0x4cdad506 → uint256
previewWithdraw 0x0a28a477 → uint256
prove 0x45152ae3 → address
stakerFeeBips 0x6b4a5b8f → uint256
staking 0x4cf088d9 → address
symbol 0x95d89b41 → string
totalAssets 0x01e1d114 → uint256
totalSupply 0x18160ddd → uint256

Write Contract 11 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address spender
uint256 value
returns: bool
cancel 0x452115d6
address[] _targets
uint256[] _values
bytes[] _calldatas
bytes32 _descriptionHash
returns: uint256
castVote 0x56781388
uint256 _proposalId
uint8 _support
returns: uint256
deposit 0x6e553f65
uint256 assets
address receiver
returns: uint256
mint 0x94bf804d
uint256 shares
address receiver
returns: uint256
propose 0x7d5e81e2
address[] _targets
uint256[] _values
bytes[] _calldatas
string _description
returns: uint256
redeem 0xba087652
uint256 shares
address receiver
address owner
returns: uint256
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferProveToStaking 0xf2638fa0
address _from
uint256 _amount
withdraw 0xb460af94
uint256 assets
address receiver
address owner
returns: uint256

Recent Transactions

No transactions found for this address