ETH Price: $2,265.18 (-6.44%)
Gas: 0.04 GWei

Contract

0x6c7a05e0AE641c6559fD76ac56641778B6eCd776

Overview

ETH Balance

Scroll LogoScroll LogoScroll Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deploy And Regis...45148622024-03-30 7:50:53169 days ago1711785053IN
0x6c7a05e0...8B6eCd776
0 ETH0.002094470.5151
Initialize38799992024-03-05 22:46:14194 days ago1709678774IN
0x6c7a05e0...8B6eCd776
0 ETH0.000518180.66

Latest 2 internal transactions

Parent Transaction Hash Block From To
45148622024-03-30 7:50:53169 days ago1711785053
0x6c7a05e0...8B6eCd776
 Contract Creation0 ETH
38799992024-03-05 22:46:14194 days ago1709678774  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SuccinctGateway

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 100000 runs

Other Settings:
london EvmVersion
File 1 of 10 : SuccinctGateway.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import {ISuccinctGateway, WhitelistStatus} from "./interfaces/ISuccinctGateway.sol";
import {IFunctionVerifier} from "./interfaces/IFunctionVerifier.sol";
import {FunctionRegistry} from "./FunctionRegistry.sol";
import {IFeeVault} from "./payments/interfaces/IFeeVault.sol";
import {Initializable} from "@openzeppelin-upgradeable/contracts/proxy/utils/Initializable.sol";
import {OwnableUpgradeable} from "@openzeppelin-upgradeable/contracts/access/OwnableUpgradeable.sol";

contract SuccinctGateway is
    ISuccinctGateway,
    FunctionRegistry,
    Initializable,
    OwnableUpgradeable
{
    /// @notice The address of the fee vault.
    address public feeVault;

    /// @notice A nonce for keeping track of requests.
    uint32 public nonce;

    /// @notice A mapping from request nonces to request hashes.
    mapping(uint32 => bytes32) public requests;

    /// @notice The currently verified function identifier.
    bytes32 public verifiedFunctionId;

    /// @notice The currently verified function input hash.
    bytes32 public verifiedInputHash;

    /// @notice The currently verified function output.
    bytes public verifiedOutput;

    /// @notice A flag that indicates whether the contract is currently making a callback.
    bool public override isCallback;

    mapping(bytes32 => WhitelistStatus) public whitelistStatus;

    /// @notice The allowed provers that can fulfill requests.
    mapping(bytes32 => mapping(address => bool)) public allowedProvers;

    /// @dev Protects functions from being re-entered during a fullfil call.
    modifier nonReentrant() {
        if (
            isCallback || verifiedFunctionId != bytes32(0) || verifiedInputHash != bytes32(0)
                || verifiedOutput.length != 0
        ) {
            revert ReentrantFulfill();
        }
        _;
    }

    /// @dev Protects functions from being called by anyone other than the prover.
    modifier onlyProver(bytes32 _functionId) {
        if (
            whitelistStatus[_functionId] == WhitelistStatus.Default
                && !allowedProvers[bytes32(0)][msg.sender]
        ) {
            revert OnlyProver(_functionId, msg.sender);
        } else if (
            whitelistStatus[_functionId] == WhitelistStatus.Custom
                && !allowedProvers[_functionId][msg.sender]
        ) {
            revert OnlyProver(_functionId, msg.sender);
        }
        _;
    }

    /// @notice Initializes the contract. Only callable once, and only callable by deployer.
    /// @param _owner The address of the owner of the contract.
    /// @param _feeVault The address of the fee vault.
    /// @param _defaultProver The address of the default prover.
    function initialize(address _owner, address _feeVault, address _defaultProver)
        external
        initializer
    {
        _transferOwnership(_owner);
        feeVault = _feeVault;
        allowedProvers[bytes32(0)][_defaultProver] = true;
    }

    /// @notice Creates a onchain request for a proof. The output and proof is fulfilled asynchronously
    ///         by the provided callback.
    /// @param _functionId The function identifier.
    /// @param _input The function input.
    /// @param _context The function context.
    /// @param _callbackSelector The selector of the callback function.
    /// @param _callbackGasLimit The gas limit for the callback function.
    function requestCallback(
        bytes32 _functionId,
        bytes memory _input,
        bytes memory _context,
        bytes4 _callbackSelector,
        uint32 _callbackGasLimit
    ) external payable override returns (bytes32) {
        // Compute the callback hash uniquely associated with this request.
        bytes32 inputHash = sha256(_input);
        bytes32 contextHash = keccak256(_context);
        address callbackAddress = msg.sender;
        bytes32 requestHash = _requestHash(
            nonce,
            _functionId,
            inputHash,
            contextHash,
            callbackAddress,
            _callbackSelector,
            _callbackGasLimit
        );

        // Store the callback hash.
        requests[nonce] = requestHash;
        emit RequestCallback(
            nonce,
            _functionId,
            _input,
            _context,
            callbackAddress,
            _callbackSelector,
            _callbackGasLimit,
            msg.value
        );

        // Increment the nonce.
        nonce++;

        // Send the fee to the vault.
        if (feeVault != address(0)) {
            IFeeVault(feeVault).depositNative{value: msg.value}(callbackAddress);
        }

        return requestHash;
    }

    /// @notice Creates a proof request for a call. This function is equivalent to an off-chain request
    ///         through an API.
    /// @param _functionId The function identifier.
    /// @param _input The function input.
    /// @param _entryAddress The address of the callback contract.
    /// @param _entryCalldata The entry calldata for the call.
    /// @param _entryGasLimit The gas limit for the call.
    function requestCall(
        bytes32 _functionId,
        bytes memory _input,
        address _entryAddress,
        bytes memory _entryCalldata,
        uint32 _entryGasLimit
    ) external payable override {
        // Emit event.
        emit RequestCall(
            _functionId,
            _input,
            _entryAddress,
            _entryCalldata,
            _entryGasLimit,
            msg.sender,
            msg.value
        );

        // Send the fee to the vault.
        if (feeVault != address(0)) {
            IFeeVault(feeVault).depositNative{value: msg.value}(msg.sender);
        }
    }

    /// @notice If the call matches the currently verified function, returns the output. Otherwise,
    ///         this function reverts.
    /// @param _functionId The function identifier.
    /// @param _input The function input.
    function verifiedCall(bytes32 _functionId, bytes memory _input)
        external
        view
        override
        returns (bytes memory)
    {
        bytes32 inputHash = sha256(_input);
        if (verifiedFunctionId == _functionId && verifiedInputHash == inputHash) {
            return verifiedOutput;
        } else {
            revert InvalidCall(_functionId, _input);
        }
    }

    /// @notice Fulfills a request by providing the output and proof.
    /// @param _nonce The nonce of the request.
    /// @param _functionId The function identifier.
    /// @param _inputHash The hash of the function input.
    /// @param _callbackAddress The address of the callback contract.
    /// @param _callbackSelector The selector of the callback function.
    /// @param _callbackGasLimit The gas limit for the callback function.
    /// @param _context The function context.
    /// @param _output The function output.
    /// @param _proof The function proof.
    function fulfillCallback(
        uint32 _nonce,
        bytes32 _functionId,
        bytes32 _inputHash,
        address _callbackAddress,
        bytes4 _callbackSelector,
        uint32 _callbackGasLimit,
        bytes memory _context,
        bytes memory _output,
        bytes memory _proof
    ) external nonReentrant onlyProver(_functionId) {
        // Reconstruct the callback hash.
        bytes32 contextHash = keccak256(_context);
        bytes32 requestHash = _requestHash(
            _nonce,
            _functionId,
            _inputHash,
            contextHash,
            _callbackAddress,
            _callbackSelector,
            _callbackGasLimit
        );

        // Assert that the callback hash is unfilfilled.
        if (requests[_nonce] != requestHash) {
            revert InvalidRequest(_nonce, requests[_nonce], requestHash);
        }

        // Delete the callback hash for a gas refund.
        delete requests[_nonce];

        // Compute the output hash.
        bytes32 outputHash = sha256(_output);

        // Verify the proof.
        _verify(_functionId, _inputHash, outputHash, _proof);

        // Execute the callback.
        isCallback = true;
        (bool status,) = _callbackAddress.call{gas: _callbackGasLimit}(
            abi.encodeWithSelector(_callbackSelector, _output, _context)
        );
        isCallback = false;

        // If the callback failed, revert.
        if (!status) {
            revert CallbackFailed(_callbackSelector, _output, _context);
        }

        // Emit event.
        emit RequestFulfilled(_nonce, _functionId, _inputHash, outputHash);
    }

    /// @notice The entrypoint for fulfilling a call.
    /// @param _functionId The function identifier.
    /// @param _input The function input.
    /// @param _output The function output.
    /// @param _proof The function proof.
    /// @param _callbackAddress The address of the callback contract.
    /// @param _callbackData The data for the callback function.
    function fulfillCall(
        bytes32 _functionId,
        bytes memory _input,
        bytes memory _output,
        bytes memory _proof,
        address _callbackAddress,
        bytes memory _callbackData
    ) external nonReentrant onlyProver(_functionId) {
        // Compute the input and output hashes.
        bytes32 inputHash = sha256(_input);
        bytes32 outputHash = sha256(_output);

        // Verify the proof.
        _verify(_functionId, inputHash, outputHash, _proof);

        // Set the current verified call.
        verifiedFunctionId = _functionId;
        verifiedInputHash = inputHash;
        verifiedOutput = _output;

        // Execute the callback.
        (bool status,) = _callbackAddress.call(_callbackData);
        if (!status) {
            revert CallFailed(_callbackAddress, _callbackData);
        }

        // Delete the current verified call.
        delete verifiedFunctionId;
        delete verifiedInputHash;
        delete verifiedOutput;

        // Emit event.
        emit Call(_functionId, inputHash, outputHash);
    }

    /// @notice Sets the whitelist status for a function.
    /// @param _functionId The function identifier.
    /// @param _status The whitelist status to set.
    function setWhitelistStatus(bytes32 _functionId, WhitelistStatus _status) external {
        if (msg.sender != verifierOwners[_functionId]) {
            revert NotFunctionOwner(msg.sender, verifierOwners[_functionId]);
        }
        whitelistStatus[_functionId] = _status;
        emit WhitelistStatusUpdated(_functionId, _status);
    }

    /// @notice Add a custom prover.
    /// @param _functionId The function identifier.
    /// @param _prover The address of the prover to add.
    function addCustomProver(bytes32 _functionId, address _prover) external {
        if (msg.sender != verifierOwners[_functionId]) {
            revert NotFunctionOwner(msg.sender, verifierOwners[_functionId]);
        }
        allowedProvers[_functionId][_prover] = true;
        emit ProverUpdated(_functionId, _prover, true);
    }

    /// @notice Remove a custom prover.
    /// @param _functionId The function identifier.
    /// @param _prover The address of the prover to remove.
    function removeCustomProver(bytes32 _functionId, address _prover) external {
        if (msg.sender != verifierOwners[_functionId]) {
            revert NotFunctionOwner(msg.sender, verifierOwners[_functionId]);
        }
        delete allowedProvers[_functionId][_prover];
        emit ProverUpdated(_functionId, _prover, false);
    }

    /// @notice Add a default prover.
    /// @param _prover The address of the prover to add.
    function addDefaultProver(address _prover) external onlyOwner {
        allowedProvers[bytes32(0)][_prover] = true;
        emit ProverUpdated(bytes32(0), _prover, true);
    }

    /// @notice Remove a default prover.
    /// @param _prover The address of the prover to remove.
    function removeDefaultProver(address _prover) external onlyOwner {
        delete allowedProvers[bytes32(0)][_prover];
        emit ProverUpdated(bytes32(0), _prover, false);
    }

    /// @notice Sets the fee vault to a new address. Can be set to address(0) to disable fees.
    /// @param _feeVault The address of the fee vault.
    function setFeeVault(address _feeVault) external onlyOwner {
        emit SetFeeVault(feeVault, _feeVault);
        feeVault = _feeVault;
    }

    /// @notice Recovers stuck ETH from the contract.
    /// @param _to The address to send the ETH to.
    /// @param _amount The wei amount of ETH to send.
    function recover(address _to, uint256 _amount) external onlyOwner {
        (bool success,) = _to.call{value: _amount}("");
        if (!success) {
            revert RecoverFailed();
        }
    }

    /// @dev Computes a unique identifier for a request.
    /// @param _functionId The function identifier.
    /// @param _inputHash The hash of the function input.
    /// @param _contextHash The hash of the function context.
    /// @param _callbackAddress The address of the callback contract.
    /// @param _callbackSelector The selector of the callback function.
    /// @param _callbackGasLimit The gas limit for the callback function.
    function _requestHash(
        uint32 _nonce,
        bytes32 _functionId,
        bytes32 _inputHash,
        bytes32 _contextHash,
        address _callbackAddress,
        bytes4 _callbackSelector,
        uint32 _callbackGasLimit
    ) internal pure returns (bytes32) {
        return keccak256(
            abi.encodePacked(
                _nonce,
                _functionId,
                _inputHash,
                _contextHash,
                _callbackAddress,
                _callbackSelector,
                _callbackGasLimit
            )
        );
    }

    /// @dev Verifies a proof with respect to a function identifier, input hash, and output hash.
    /// @param _functionId The function identifier.
    /// @param _inputHash The hash of the function input.
    /// @param _outputHash The hash of the function output.
    /// @param _proof The function proof.
    function _verify(
        bytes32 _functionId,
        bytes32 _inputHash,
        bytes32 _outputHash,
        bytes memory _proof
    ) internal {
        address verifier = verifiers[_functionId];
        if (!IFunctionVerifier(verifier).verify(_inputHash, _outputHash, _proof)) {
            revert InvalidProof(address(verifier), _inputHash, _outputHash, _proof);
        }
    }
}

File 2 of 10 : ISuccinctGateway.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

enum WhitelistStatus {
    Default,
    Custom,
    Disabled
}

interface ISuccinctGatewayEvents {
    event RequestCallback(
        uint32 indexed nonce,
        bytes32 indexed functionId,
        bytes input,
        bytes context,
        address callbackAddress,
        bytes4 callbackSelector,
        uint32 callbackGasLimit,
        uint256 feeAmount
    );
    event RequestCall(
        bytes32 indexed functionId,
        bytes input,
        address entryAddress,
        bytes entryCalldata,
        uint32 entryGasLimit,
        address sender,
        uint256 feeAmount
    );
    event RequestFulfilled(
        uint32 indexed nonce, bytes32 indexed functionId, bytes32 inputHash, bytes32 outputHash
    );
    event Call(bytes32 indexed functionId, bytes32 inputHash, bytes32 outputHash);
    event SetFeeVault(address indexed oldFeeVault, address indexed newFeeVault);
    event ProverUpdated(bytes32 indexed functionId, address indexed prover, bool added);
    event WhitelistStatusUpdated(bytes32 indexed functionId, WhitelistStatus status);
}

interface ISuccinctGatewayErrors {
    error InvalidRequest(uint32 nonce, bytes32 expectedRequestHash, bytes32 requestHash);
    error CallbackFailed(bytes4 callbackSelector, bytes output, bytes context);
    error InvalidCall(bytes32 functionId, bytes input);
    error CallFailed(address callbackAddress, bytes callbackData);
    error InvalidProof(address verifier, bytes32 inputHash, bytes32 outputHash, bytes proof);
    error ReentrantFulfill();
    error OnlyProver(bytes32 functionId, address sender);
    error RecoverFailed();
}

interface ISuccinctGateway is ISuccinctGatewayEvents, ISuccinctGatewayErrors {
    function requestCallback(
        bytes32 functionId,
        bytes memory input,
        bytes memory context,
        bytes4 callbackSelector,
        uint32 callbackGasLimit
    ) external payable returns (bytes32);

    function requestCall(
        bytes32 functionId,
        bytes memory input,
        address entryAddress,
        bytes memory entryData,
        uint32 entryGasLimit
    ) external payable;

    function verifiedCall(bytes32 functionId, bytes memory input)
        external
        view
        returns (bytes memory);

    function isCallback() external view returns (bool);
}

File 3 of 10 : IFunctionVerifier.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IFunctionVerifier {
    function verify(bytes32 inputHash, bytes32 outputHash, bytes memory proof)
        external
        returns (bool);

    function verificationKeyHash() external view returns (bytes32);
}

File 4 of 10 : FunctionRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import {IFunctionRegistry} from "./interfaces/IFunctionRegistry.sol";

abstract contract FunctionRegistry is IFunctionRegistry {
    /// @notice Maps function IDs to their corresponding verifiers.
    mapping(bytes32 => address) public override verifiers;

    /// @notice Maps function IDs to their corresponding owners.
    mapping(bytes32 => address) public override verifierOwners;

    /// @notice Registers a function, using a pre-deployed verifier.
    /// @dev The _owner can be set to address 0 to remove any update capabilities.
    /// @param _owner The owner of the function.
    /// @param _verifier The address of the verifier.
    /// @param _salt The salt to use for calculating the function ID.
    function registerFunction(address _owner, address _verifier, bytes32 _salt)
        external
        override
        returns (bytes32 functionId)
    {
        functionId = getFunctionId(_owner, _salt);
        _register(functionId, _owner, _verifier);
        emit FunctionRegistered(functionId, _verifier, _salt, _owner);
    }

    /// @notice Registers a function, using CREATE2 to deploy the verifier.
    /// @dev The _owner can be set to address 0 to remove any update capabilities.
    /// @param _owner The owner of the function.
    /// @param _bytecode The bytecode of the verifier.
    /// @param _salt The salt to use for calculating the function ID.
    function deployAndRegisterFunction(address _owner, bytes memory _bytecode, bytes32 _salt)
        external
        override
        returns (bytes32 functionId, address verifier)
    {
        functionId = getFunctionId(_owner, _salt);
        verifier = _deploy(_bytecode, functionId);
        _register(functionId, _owner, verifier);
        emit FunctionRegistered(functionId, verifier, _salt, _owner);
    }

    /// @notice Updates the function, using a pre-deployed verifier.
    /// @dev Only the owner of the function can update it.
    /// @param _verifier The address of the verifier.
    /// @param _salt The salt that was used when registering this function ID.
    function updateFunction(address _verifier, bytes32 _salt)
        external
        override
        returns (bytes32 functionId)
    {
        functionId = getFunctionId(msg.sender, _salt);
        _update(functionId, _verifier);
        emit FunctionVerifierUpdated(functionId, _verifier);
    }

    /// @notice Updates the function, using CREATE2 to deploy the new verifier.
    /// @dev Only the owner of the function can update it.
    /// @param _bytecode The bytecode of the verifier.
    /// @param _salt The salt that was used when registering this function ID.
    function deployAndUpdateFunction(bytes memory _bytecode, bytes32 _salt)
        external
        override
        returns (bytes32 functionId, address verifier)
    {
        functionId = getFunctionId(msg.sender, _salt);
        verifier = _deploy(_bytecode, functionId);
        _update(functionId, verifier);
        emit FunctionVerifierUpdated(functionId, verifier);
    }

    /// @notice Returns the function ID for a given owner and salt.
    /// @param _owner The owner of the function.
    /// @param _salt The salt to use.
    function getFunctionId(address _owner, bytes32 _salt)
        public
        pure
        override
        returns (bytes32 functionId)
    {
        functionId = keccak256(abi.encode(_owner, _salt));
    }

    function _deploy(bytes memory _bytecode, bytes32 _salt)
        internal
        returns (address deployedAddr)
    {
        if (_bytecode.length == 0) revert EmptyBytecode();

        assembly {
            deployedAddr := create2(0, add(_bytecode, 32), mload(_bytecode), _salt)
        }
        if (deployedAddr == address(0)) revert FailedDeploy();

        emit Deployed(keccak256(_bytecode), _salt, deployedAddr);
    }

    function _register(bytes32 functionId, address _owner, address _verifier) internal {
        if (_verifier == address(0)) {
            revert VerifierCannotBeZero();
        }
        if (address(verifiers[functionId]) != address(0)) {
            revert FunctionAlreadyRegistered(functionId); // should call update instead
        }
        verifierOwners[functionId] = _owner;
        verifiers[functionId] = _verifier;
    }

    function _update(bytes32 functionId, address _verifier) internal {
        if (_verifier == address(0)) {
            revert VerifierCannotBeZero();
        }
        if (msg.sender != verifierOwners[functionId]) {
            revert NotFunctionOwner(msg.sender, verifierOwners[functionId]);
        }
        if (_verifier == verifiers[functionId]) {
            revert VerifierAlreadyUpdated(functionId);
        }
        verifiers[functionId] = _verifier;
    }
}

File 5 of 10 : IFeeVault.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

interface IFeeVaultEvents {
    event Received(address indexed account, address indexed token, uint256 amount);
    event Deducted(address indexed account, address indexed token, uint256 amount);
    event Collected(address indexed to, address indexed token, uint256 amount);
}

interface IFeeVaultErrors {
    error InvalidAccount(address account);
    error InvalidToken(address token);
    error InsufficentAllowance(address token, uint256 amount);
    error InsufficientBalance(address token, uint256 amount);
    error FailedToSendNative(uint256 amount);
    error OnlyDeductor(address sender);
}

interface IFeeVault is IFeeVaultEvents, IFeeVaultErrors {
    function balances(address token, address account) external view returns (uint256);
    function depositNative(address account) external payable;
    function deposit(address account, address token, uint256 amount) external;
}

File 6 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 7 of 10 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 8 of 10 : IFunctionRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IFunctionRegistryEvents {
    event FunctionRegistered(
        bytes32 indexed functionId, address verifier, bytes32 salt, address owner
    );
    event FunctionVerifierUpdated(bytes32 indexed functionId, address verifier);
    event Deployed(
        bytes32 indexed bytecodeHash, bytes32 indexed salt, address indexed deployedAddress
    );
}

interface IFunctionRegistryErrors {
    error EmptyBytecode();
    error FailedDeploy();
    error VerifierCannotBeZero();
    error VerifierAlreadyUpdated(bytes32 functionId);
    error FunctionAlreadyRegistered(bytes32 functionId);
    error NotFunctionOwner(address owner, address actualOwner);
}

interface IFunctionRegistry is IFunctionRegistryEvents, IFunctionRegistryErrors {
    function verifiers(bytes32 functionId) external view returns (address verifier);
    function verifierOwners(bytes32 functionId) external view returns (address owner);
    function registerFunction(address owner, address verifier, bytes32 salt)
        external
        returns (bytes32 functionId);
    function deployAndRegisterFunction(address owner, bytes memory bytecode, bytes32 salt)
        external
        returns (bytes32 functionId, address verifier);
    function updateFunction(address verifier, bytes32 salt) external returns (bytes32 functionId);
    function deployAndUpdateFunction(bytes memory bytecode, bytes32 salt)
        external
        returns (bytes32 functionId, address verifier);
    function getFunctionId(address owner, bytes32 salt)
        external
        pure
        returns (bytes32 functionId);
}

File 9 of 10 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 10 of 10 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "@safe/=lib/safe-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "safe-contracts/=lib/safe-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"callbackAddress","type":"address"},{"internalType":"bytes","name":"callbackData","type":"bytes"}],"name":"CallFailed","type":"error"},{"inputs":[{"internalType":"bytes4","name":"callbackSelector","type":"bytes4"},{"internalType":"bytes","name":"output","type":"bytes"},{"internalType":"bytes","name":"context","type":"bytes"}],"name":"CallbackFailed","type":"error"},{"inputs":[],"name":"EmptyBytecode","type":"error"},{"inputs":[],"name":"FailedDeploy","type":"error"},{"inputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"}],"name":"FunctionAlreadyRegistered","type":"error"},{"inputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"},{"internalType":"bytes","name":"input","type":"bytes"}],"name":"InvalidCall","type":"error"},{"inputs":[{"internalType":"address","name":"verifier","type":"address"},{"internalType":"bytes32","name":"inputHash","type":"bytes32"},{"internalType":"bytes32","name":"outputHash","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"InvalidProof","type":"error"},{"inputs":[{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"bytes32","name":"expectedRequestHash","type":"bytes32"},{"internalType":"bytes32","name":"requestHash","type":"bytes32"}],"name":"InvalidRequest","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"actualOwner","type":"address"}],"name":"NotFunctionOwner","type":"error"},{"inputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"},{"internalType":"address","name":"sender","type":"address"}],"name":"OnlyProver","type":"error"},{"inputs":[],"name":"RecoverFailed","type":"error"},{"inputs":[],"name":"ReentrantFulfill","type":"error"},{"inputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"}],"name":"VerifierAlreadyUpdated","type":"error"},{"inputs":[],"name":"VerifierCannotBeZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"inputHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"outputHash","type":"bytes32"}],"name":"Call","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"bytecodeHash","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":true,"internalType":"address","name":"deployedAddress","type":"address"}],"name":"Deployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"verifier","type":"address"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"FunctionRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"verifier","type":"address"}],"name":"FunctionVerifierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"prover","type":"address"},{"indexed":false,"internalType":"bool","name":"added","type":"bool"}],"name":"ProverUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"input","type":"bytes"},{"indexed":false,"internalType":"address","name":"entryAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"entryCalldata","type":"bytes"},{"indexed":false,"internalType":"uint32","name":"entryGasLimit","type":"uint32"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"RequestCall","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"nonce","type":"uint32"},{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"input","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"context","type":"bytes"},{"indexed":false,"internalType":"address","name":"callbackAddress","type":"address"},{"indexed":false,"internalType":"bytes4","name":"callbackSelector","type":"bytes4"},{"indexed":false,"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"RequestCallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"nonce","type":"uint32"},{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"inputHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"outputHash","type":"bytes32"}],"name":"RequestFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldFeeVault","type":"address"},{"indexed":true,"internalType":"address","name":"newFeeVault","type":"address"}],"name":"SetFeeVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"functionId","type":"bytes32"},{"indexed":false,"internalType":"enum WhitelistStatus","name":"status","type":"uint8"}],"name":"WhitelistStatusUpdated","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"address","name":"_prover","type":"address"}],"name":"addCustomProver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_prover","type":"address"}],"name":"addDefaultProver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"allowedProvers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes","name":"_bytecode","type":"bytes"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deployAndRegisterFunction","outputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"},{"internalType":"address","name":"verifier","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_bytecode","type":"bytes"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deployAndUpdateFunction","outputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"},{"internalType":"address","name":"verifier","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"bytes","name":"_input","type":"bytes"},{"internalType":"bytes","name":"_output","type":"bytes"},{"internalType":"bytes","name":"_proof","type":"bytes"},{"internalType":"address","name":"_callbackAddress","type":"address"},{"internalType":"bytes","name":"_callbackData","type":"bytes"}],"name":"fulfillCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_nonce","type":"uint32"},{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"bytes32","name":"_inputHash","type":"bytes32"},{"internalType":"address","name":"_callbackAddress","type":"address"},{"internalType":"bytes4","name":"_callbackSelector","type":"bytes4"},{"internalType":"uint32","name":"_callbackGasLimit","type":"uint32"},{"internalType":"bytes","name":"_context","type":"bytes"},{"internalType":"bytes","name":"_output","type":"bytes"},{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"fulfillCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"getFunctionId","outputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_feeVault","type":"address"},{"internalType":"address","name":"_defaultProver","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isCallback","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_verifier","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"registerFunction","outputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"address","name":"_prover","type":"address"}],"name":"removeCustomProver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_prover","type":"address"}],"name":"removeDefaultProver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"bytes","name":"_input","type":"bytes"},{"internalType":"address","name":"_entryAddress","type":"address"},{"internalType":"bytes","name":"_entryCalldata","type":"bytes"},{"internalType":"uint32","name":"_entryGasLimit","type":"uint32"}],"name":"requestCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"bytes","name":"_input","type":"bytes"},{"internalType":"bytes","name":"_context","type":"bytes"},{"internalType":"bytes4","name":"_callbackSelector","type":"bytes4"},{"internalType":"uint32","name":"_callbackGasLimit","type":"uint32"}],"name":"requestCallback","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"requests","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeVault","type":"address"}],"name":"setFeeVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"enum WhitelistStatus","name":"_status","type":"uint8"}],"name":"setWhitelistStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_verifier","type":"address"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"updateFunction","outputs":[{"internalType":"bytes32","name":"functionId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_functionId","type":"bytes32"},{"internalType":"bytes","name":"_input","type":"bytes"}],"name":"verifiedCall","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifiedFunctionId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifiedInputHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifiedOutput","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"verifierOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"verifiers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"whitelistStatus","outputs":[{"internalType":"enum WhitelistStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061320d806100206000396000f3fe6080604052600436106101e35760003560e01c80638157ce2b11610102578063c0c53b8b11610095578063ed4ec5e111610064578063ed4ec5e114610673578063efe1c950146106ae578063f2fde38b146106f1578063ff0b2f8a1461071157600080fd5b8063c0c53b8b146105ae578063ca6b63c7146105ce578063d0bf5dab146105ee578063dd469fa41461065357600080fd5b8063affed0e0116100d1578063affed0e014610511578063b3f04fdf1461055b578063b97ed3ca1461056e578063bac2a1061461058e57600080fd5b80638157ce2b1461046d5780638bcfc3a0146104835780638da5cb5b146104c6578063a591f97f146104f157600080fd5b8063478222c21161017a578063715018a611610149578063715018a6146104025780637413555d1461041757806378370ebd1461043757806380e0bbb01461045757600080fd5b8063478222c214610333578063493e9b81146103855780635705ae43146103c25780635e5da3b6146103e257600080fd5b8063176e62fd116101b6578063176e62fd146102965780633a446f68146102b6578063420d334c14610300578063436a61d51461032057600080fd5b806305d7c1cf146101e85780630ab469b014610217578063164d420714610252578063173869f014610274575b600080fd5b3480156101f457600080fd5b50606c546102029060ff1681565b60405190151581526020015b60405180910390f35b34801561022357600080fd5b50610244610232366004612645565b60686020526000908152604090205481565b60405190815260200161020e565b34801561025e57600080fd5b5061027261026d36600461268b565b610731565b005b34801561028057600080fd5b50610289610851565b60405161020e9190612725565b3480156102a257600080fd5b506102896102b1366004612812565b6108df565b3480156102c257600080fd5b506102d66102d1366004612859565b610a1b565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161020e565b34801561030c57600080fd5b5061027261031b3660046128b0565b610ad6565b61027261032e3660046128e4565b610bec565b34801561033f57600080fd5b506067546103609073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161020e565b34801561039157600080fd5b506103b56103a0366004612973565b606d6020526000908152604090205460ff1681565b60405161020e91906129bb565b3480156103ce57600080fd5b506102726103dd3660046129fc565b610cd9565b3480156103ee57600080fd5b506102446103fd366004612a26565b610d80565b34801561040e57600080fd5b50610272610e2c565b34801561042357600080fd5b50610272610432366004612a62565b610e40565b34801561044357600080fd5b50610272610452366004612aad565b610ee8565b34801561046357600080fd5b50610244606a5481565b34801561047957600080fd5b5061024460695481565b34801561048f57600080fd5b5061036061049e366004612973565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156104d257600080fd5b5060355473ffffffffffffffffffffffffffffffffffffffff16610360565b3480156104fd57600080fd5b5061027261050c366004612a62565b611404565b34801561051d57600080fd5b506067546105469074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff909116815260200161020e565b610244610569366004612b8c565b61149a565b34801561057a57600080fd5b5061027261058936600461268b565b611742565b34801561059a57600080fd5b506102726105a9366004612c0f565b61185b565b3480156105ba57600080fd5b506102726105c9366004612cd5565b611bc9565b3480156105da57600080fd5b506102446105e93660046129fc565b611dfc565b3480156105fa57600080fd5b506102446106093660046129fc565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602082015290810182905260009060600160405160208183030381529060405280519060200120905092915050565b34801561065f57600080fd5b5061027261066e366004612a62565b611e81565b34801561067f57600080fd5b5061020261068e36600461268b565b606e60209081526000928352604080842090915290825290205460ff1681565b3480156106ba57600080fd5b506103606106c9366004612973565b60006020819052908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156106fd57600080fd5b5061027261070c366004612a62565b611f29565b34801561071d57600080fd5b506102d661072c366004612d18565b611fe0565b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146107c257600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6000828152606e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff851680855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905590519283529184917f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f91015b60405180910390a35050565b606b805461085e90612d5d565b80601f016020809104026020016040519081016040528092919081815260200182805461088a90612d5d565b80156108d75780601f106108ac576101008083540402835291602001916108d7565b820191906000526020600020905b8154815290600101906020018083116108ba57829003601f168201915b505050505081565b606060006002836040516108f39190612db0565b602060405180830381855afa158015610910573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906109339190612dcc565b905083606954148015610947575080606a54145b156109df57606b805461095990612d5d565b80601f016020809104026020016040519081016040528092919081815260200182805461098590612d5d565b80156109d25780601f106109a7576101008083540402835291602001916109d2565b820191906000526020600020905b8154815290600101906020018083116109b557829003601f168201915b5050505050915050610a15565b83836040517faa74a2cb0000000000000000000000000000000000000000000000000000000081526004016107b9929190612de5565b92915050565b6040805173ffffffffffffffffffffffffffffffffffffffff8516602080830191909152818301849052825180830384018152606090920190925280519101206000610a678483612074565b9050610a7482868361215a565b6040805173ffffffffffffffffffffffffffffffffffffffff838116825260208201869052871681830152905183917fdfa40ee17618caabca7b46eb80031e3d05a27a30de957d29b4a2a71426db5a63919081900360600190a2935093915050565b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff163314610b6257600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016107b9565b6000828152606d6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610bab57610bab61298c565b0217905550817f1cfd8c214b5ba0c1306317bd132fa41ca741da227af86a75e9010708561be80e82604051610be091906129bb565b60405180910390a25050565b847f88632d59d3df3bee2ce2a06fbb05e1c8542c44cb2e7339bb1812500a978644d3858585853334604051610c2696959493929190612e06565b60405180910390a260675473ffffffffffffffffffffffffffffffffffffffff1615610cd2576067546040517f33bb7f9100000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116906333bb7f919034906024016000604051808303818588803b158015610cb857600080fd5b505af1158015610ccc573d6000803e3d6000fd5b50505050505b5050505050565b610ce161226c565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610d3b576040519150601f19603f3d011682016040523d82523d6000602084013e610d40565b606091505b5050905080610d7b576040517f74e6fd0800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff851660208083019190915281830184905282518083038401815260609092019092528051910120610dcb81858561215a565b6040805173ffffffffffffffffffffffffffffffffffffffff858116825260208201859052861681830152905182917fdfa40ee17618caabca7b46eb80031e3d05a27a30de957d29b4a2a71426db5a63919081900360600190a29392505050565b610e3461226c565b610e3e60006122ed565b565b610e4861226c565b73ffffffffffffffffffffffffffffffffffffffff811660008181527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055518281527f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f91015b60405180910390a350565b606c5460ff1680610efa575060695415155b80610f065750606a5415155b80610f1e5750606b8054610f1990612d5d565b151590505b15610f55576040517fc1b1fbf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87600080828152606d602052604090205460ff166002811115610f7a57610f7a61298c565b148015610fb657503360009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f602052604090205460ff16155b15610ff6576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b60016000828152606d602052604090205460ff16600281111561101b5761101b61298c565b14801561104257506000818152606e6020908152604080832033845290915290205460ff16155b15611082576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b8351602080860191909120604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08f811b821683870152602483018f9052604483018e9052606483018590527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608e901b1660848401528b821660988401528a901b16609c8201528151808203608001815260a0909101825280519084012063ffffffff8e1660009081526068909452922054909190811461119c5763ffffffff8c16600081815260686020526040908190205490517f87e020b800000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016107b9565b63ffffffff8c16600090815260686020526040808220829055516002906111c4908890612db0565b602060405180830381855afa1580156111e1573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906112049190612dcc565b90506112128c8c8388612364565b606c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405160009073ffffffffffffffffffffffffffffffffffffffff8c169063ffffffff8b16908c90611275908b908d90602401612e6c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516112fe9190612db0565b60006040518083038160008787f1925050503d806000811461133c576040519150601f19603f3d011682016040523d82523d6000602084013e611341565b606091505b5050606c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690559050806113aa578987896040517f2b9282960000000000000000000000000000000000000000000000000000000081526004016107b993929190612e9a565b8c8e63ffffffff167f361a2fc76bc9f35b079dd353fd7fdd8aaf61f1a7979cf59653225692c19bbff28e856040516113ec929190918252602082015260400190565b60405180910390a35050505050505050505050505050565b61140c61226c565b60675460405173ffffffffffffffffffffffffffffffffffffffff8084169216907ff0cca8e172b90b70922c6757d918f7a532326dfd3e9f3c5b117a616d2bb0721290600090a3606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000806002866040516114ad9190612db0565b602060405180830381855afa1580156114ca573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906114ed9190612dcc565b8551602080880191909120606754604080517401000000000000000000000000000000000000000090920460e090811b7fffffffff0000000000000000000000000000000000000000000000000000000090811684870152602484018e9052604484018790526064840185905233606081901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166084860152818c166098860152918a901b16609c8401528151608081850301815260a090930190915281519190930120929350916000906067805463ffffffff7401000000000000000000000000000000000000000091829004811660009081526068602052604090819020859055925492519394508d9391909204909116907f22a09d598b323a3c65d69787dd6fd143dd8e4d2f91733c247113167df31e3e9390611639908d908d9088908e908e903490612ef1565b60405180910390a36067805474010000000000000000000000000000000000000000900463ffffffff1690601461166f83612f7a565b825463ffffffff9182166101009390930a92830291909202199091161790555060675473ffffffffffffffffffffffffffffffffffffffff1615611735576067546040517f33bb7f9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152909116906333bb7f919034906024016000604051808303818588803b15801561171b57600080fd5b505af115801561172f573d6000803e3d6000fd5b50505050505b9998505050505050505050565b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146117ce57600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016107b9565b6000828152606e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155905190815284917f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f9101610845565b606c5460ff168061186d575060695415155b806118795750606a5415155b806118915750606b805461188c90612d5d565b151590505b156118c8576040517fc1b1fbf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85600080828152606d602052604090205460ff1660028111156118ed576118ed61298c565b14801561192957503360009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f602052604090205460ff16155b15611969576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b60016000828152606d602052604090205460ff16600281111561198e5761198e61298c565b1480156119b557506000818152606e6020908152604080832033845290915290205460ff16155b156119f5576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b6000600287604051611a079190612db0565b602060405180830381855afa158015611a24573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611a479190612dcc565b90506000600287604051611a5b9190612db0565b602060405180830381855afa158015611a78573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611a9b9190612dcc565b9050611aa989838389612364565b6069899055606a829055606b611abf8882613012565b5060008573ffffffffffffffffffffffffffffffffffffffff1685604051611ae79190612db0565b6000604051808303816000865af19150503d8060008114611b24576040519150601f19603f3d011682016040523d82523d6000602084013e611b29565b606091505b5050905080611b685785856040517f6c544f330000000000000000000000000000000000000000000000000000000081526004016107b992919061312c565b606960009055606a60009055606b6000611b8291906125de565b60408051848152602081018490528b917f41d7122d18af9f0c92f23bcea9d5fa416cadcd1ed2fc8e544a3c89b841ecfd15910160405180910390a250505050505050505050565b600254610100900460ff1615808015611be95750600254600160ff909116105b80611c035750303b158015611c03575060025460ff166001145b611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107b9565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611ced57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611cf6846122ed565b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85811691909117909155821660009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611df657600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b604080513360208083019190915281830184905282518083038401815260609092019092528051910120611e30818461244e565b60405173ffffffffffffffffffffffffffffffffffffffff8416815281907ffc14566d4fed0acece30e4fd5b3f5f6dadee9c5ecb852fdaf9c13999c733b7369060200160405180910390a292915050565b611e8961226c565b73ffffffffffffffffffffffffffffffffffffffff811660008181527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915590519081527f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f9101610edd565b611f3161226c565b73ffffffffffffffffffffffffffffffffffffffff8116611fd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107b9565b611fdd816122ed565b50565b60408051336020808301919091528183018490528251808303840181526060909201909252805191012060006120168483612074565b9050612022828261244e565b60405173ffffffffffffffffffffffffffffffffffffffff8216815282907ffc14566d4fed0acece30e4fd5b3f5f6dadee9c5ecb852fdaf9c13999c733b7369060200160405180910390a29250929050565b600082516000036120b1576040517f21744a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff811661210a576040517f4102e83a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8251602084012060405173ffffffffffffffffffffffffffffffffffffffff83169184917f27b8e3132afa95254770e1c1d214eafde52bc47d1b6e1f5dfcbb380c3ca3f53290600090a492915050565b73ffffffffffffffffffffffffffffffffffffffff81166121a7576040517fb52347c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526020819052604090205473ffffffffffffffffffffffffffffffffffffffff1615612206576040517f5e34c78f000000000000000000000000000000000000000000000000000000008152600481018490526024016107b9565b600092835260016020908152604080852080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff968716179091559185905290932080549093169116179055565b60355473ffffffffffffffffffffffffffffffffffffffff163314610e3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107b9565b6035805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600084815260208190526040908190205490517fde12c64000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690819063de12c640906123cd9087908790879060040161315b565b6020604051808303816000875af11580156123ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612410919061317a565b610cd257808484846040517fb638a0980000000000000000000000000000000000000000000000000000000081526004016107b9949392919061319c565b73ffffffffffffffffffffffffffffffffffffffff811661249b576040517fb52347c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff16331461252757600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016107b9565b60008281526020819052604090205473ffffffffffffffffffffffffffffffffffffffff9081169082160361258b576040517f21d0cb4d000000000000000000000000000000000000000000000000000000008152600481018390526024016107b9565b60009182526020829052604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b5080546125ea90612d5d565b6000825580601f106125fa575050565b601f016020900490600052602060002090810190611fdd91905b808211156126285760008155600101612614565b5090565b803563ffffffff8116811461264057600080fd5b919050565b60006020828403121561265757600080fd5b6126608261262c565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461264057600080fd5b6000806040838503121561269e57600080fd5b823591506126ae60208401612667565b90509250929050565b60005b838110156126d25781810151838201526020016126ba565b50506000910152565b600081518084526126f38160208601602086016126b7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061266060208301846126db565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261277857600080fd5b813567ffffffffffffffff8082111561279357612793612738565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156127d9576127d9612738565b816040528381528660208588010111156127f257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561282557600080fd5b82359150602083013567ffffffffffffffff81111561284357600080fd5b61284f85828601612767565b9150509250929050565b60008060006060848603121561286e57600080fd5b61287784612667565b9250602084013567ffffffffffffffff81111561289357600080fd5b61289f86828701612767565b925050604084013590509250925092565b600080604083850312156128c357600080fd5b823591506020830135600381106128d957600080fd5b809150509250929050565b600080600080600060a086880312156128fc57600080fd5b85359450602086013567ffffffffffffffff8082111561291b57600080fd5b61292789838a01612767565b955061293560408901612667565b9450606088013591508082111561294b57600080fd5b5061295888828901612767565b9250506129676080870161262c565b90509295509295909350565b60006020828403121561298557600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106129f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215612a0f57600080fd5b612a1883612667565b946020939093013593505050565b600080600060608486031215612a3b57600080fd5b612a4484612667565b9250612a5260208501612667565b9150604084013590509250925092565b600060208284031215612a7457600080fd5b61266082612667565b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461264057600080fd5b60008060008060008060008060006101208a8c031215612acc57600080fd5b612ad58a61262c565b985060208a0135975060408a01359650612af160608b01612667565b9550612aff60808b01612a7d565b9450612b0d60a08b0161262c565b935060c08a013567ffffffffffffffff80821115612b2a57600080fd5b612b368d838e01612767565b945060e08c0135915080821115612b4c57600080fd5b612b588d838e01612767565b93506101008c0135915080821115612b6f57600080fd5b50612b7c8c828d01612767565b9150509295985092959850929598565b600080600080600060a08688031215612ba457600080fd5b85359450602086013567ffffffffffffffff80821115612bc357600080fd5b612bcf89838a01612767565b95506040880135915080821115612be557600080fd5b50612bf288828901612767565b935050612c0160608701612a7d565b91506129676080870161262c565b60008060008060008060c08789031215612c2857600080fd5b86359550602087013567ffffffffffffffff80821115612c4757600080fd5b612c538a838b01612767565b96506040890135915080821115612c6957600080fd5b612c758a838b01612767565b95506060890135915080821115612c8b57600080fd5b612c978a838b01612767565b9450612ca560808a01612667565b935060a0890135915080821115612cbb57600080fd5b50612cc889828a01612767565b9150509295509295509295565b600080600060608486031215612cea57600080fd5b612cf384612667565b9250612d0160208501612667565b9150612d0f60408501612667565b90509250925092565b60008060408385031215612d2b57600080fd5b823567ffffffffffffffff811115612d4257600080fd5b612d4e85828601612767565b95602094909401359450505050565b600181811c90821680612d7157607f821691505b602082108103612daa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008251612dc28184602087016126b7565b9190910192915050565b600060208284031215612dde57600080fd5b5051919050565b828152604060208201526000612dfe60408301846126db565b949350505050565b60c081526000612e1960c08301896126db565b73ffffffffffffffffffffffffffffffffffffffff80891660208501528382036040850152612e4882896126db565b63ffffffff9790971660608501529490941660808301525060a00152509392505050565b604081526000612e7f60408301856126db565b8281036020840152612e9181856126db565b95945050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152606060208201526000612ed560608301856126db565b8281036040840152612ee781856126db565b9695505050505050565b60c081526000612f0460c08301896126db565b8281036020840152612f1681896126db565b91505073ffffffffffffffffffffffffffffffffffffffff861660408301527fffffffff000000000000000000000000000000000000000000000000000000008516606083015263ffffffff841660808301528260a0830152979650505050505050565b600063ffffffff808316818103612fba577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b601f821115610d7b57600081815260208120601f850160051c81016020861015612feb5750805b601f850160051c820191505b8181101561300a57828155600101612ff7565b505050505050565b815167ffffffffffffffff81111561302c5761302c612738565b6130408161303a8454612d5d565b84612fc4565b602080601f831160018114613093576000841561305d5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561300a565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156130e0578886015182559484019460019091019084016130c1565b508582101561311c57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000612dfe60408301846126db565b838152826020820152606060408201526000612e9160608301846126db565b60006020828403121561318c57600080fd5b8151801515811461266057600080fd5b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152826040820152608060608201526000612ee760808301846126db56fea2646970667358221220444dd9b1ca4e73d249637cb2342eb328a12daa5ecfd87cbbcb8ca87fd3b9e61a64736f6c63430008100033

Deployed Bytecode

0x6080604052600436106101e35760003560e01c80638157ce2b11610102578063c0c53b8b11610095578063ed4ec5e111610064578063ed4ec5e114610673578063efe1c950146106ae578063f2fde38b146106f1578063ff0b2f8a1461071157600080fd5b8063c0c53b8b146105ae578063ca6b63c7146105ce578063d0bf5dab146105ee578063dd469fa41461065357600080fd5b8063affed0e0116100d1578063affed0e014610511578063b3f04fdf1461055b578063b97ed3ca1461056e578063bac2a1061461058e57600080fd5b80638157ce2b1461046d5780638bcfc3a0146104835780638da5cb5b146104c6578063a591f97f146104f157600080fd5b8063478222c21161017a578063715018a611610149578063715018a6146104025780637413555d1461041757806378370ebd1461043757806380e0bbb01461045757600080fd5b8063478222c214610333578063493e9b81146103855780635705ae43146103c25780635e5da3b6146103e257600080fd5b8063176e62fd116101b6578063176e62fd146102965780633a446f68146102b6578063420d334c14610300578063436a61d51461032057600080fd5b806305d7c1cf146101e85780630ab469b014610217578063164d420714610252578063173869f014610274575b600080fd5b3480156101f457600080fd5b50606c546102029060ff1681565b60405190151581526020015b60405180910390f35b34801561022357600080fd5b50610244610232366004612645565b60686020526000908152604090205481565b60405190815260200161020e565b34801561025e57600080fd5b5061027261026d36600461268b565b610731565b005b34801561028057600080fd5b50610289610851565b60405161020e9190612725565b3480156102a257600080fd5b506102896102b1366004612812565b6108df565b3480156102c257600080fd5b506102d66102d1366004612859565b610a1b565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161020e565b34801561030c57600080fd5b5061027261031b3660046128b0565b610ad6565b61027261032e3660046128e4565b610bec565b34801561033f57600080fd5b506067546103609073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161020e565b34801561039157600080fd5b506103b56103a0366004612973565b606d6020526000908152604090205460ff1681565b60405161020e91906129bb565b3480156103ce57600080fd5b506102726103dd3660046129fc565b610cd9565b3480156103ee57600080fd5b506102446103fd366004612a26565b610d80565b34801561040e57600080fd5b50610272610e2c565b34801561042357600080fd5b50610272610432366004612a62565b610e40565b34801561044357600080fd5b50610272610452366004612aad565b610ee8565b34801561046357600080fd5b50610244606a5481565b34801561047957600080fd5b5061024460695481565b34801561048f57600080fd5b5061036061049e366004612973565b60016020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156104d257600080fd5b5060355473ffffffffffffffffffffffffffffffffffffffff16610360565b3480156104fd57600080fd5b5061027261050c366004612a62565b611404565b34801561051d57600080fd5b506067546105469074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff909116815260200161020e565b610244610569366004612b8c565b61149a565b34801561057a57600080fd5b5061027261058936600461268b565b611742565b34801561059a57600080fd5b506102726105a9366004612c0f565b61185b565b3480156105ba57600080fd5b506102726105c9366004612cd5565b611bc9565b3480156105da57600080fd5b506102446105e93660046129fc565b611dfc565b3480156105fa57600080fd5b506102446106093660046129fc565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602082015290810182905260009060600160405160208183030381529060405280519060200120905092915050565b34801561065f57600080fd5b5061027261066e366004612a62565b611e81565b34801561067f57600080fd5b5061020261068e36600461268b565b606e60209081526000928352604080842090915290825290205460ff1681565b3480156106ba57600080fd5b506103606106c9366004612973565b60006020819052908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156106fd57600080fd5b5061027261070c366004612a62565b611f29565b34801561071d57600080fd5b506102d661072c366004612d18565b611fe0565b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146107c257600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b6000828152606e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff851680855290835281842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905590519283529184917f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f91015b60405180910390a35050565b606b805461085e90612d5d565b80601f016020809104026020016040519081016040528092919081815260200182805461088a90612d5d565b80156108d75780601f106108ac576101008083540402835291602001916108d7565b820191906000526020600020905b8154815290600101906020018083116108ba57829003601f168201915b505050505081565b606060006002836040516108f39190612db0565b602060405180830381855afa158015610910573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906109339190612dcc565b905083606954148015610947575080606a54145b156109df57606b805461095990612d5d565b80601f016020809104026020016040519081016040528092919081815260200182805461098590612d5d565b80156109d25780601f106109a7576101008083540402835291602001916109d2565b820191906000526020600020905b8154815290600101906020018083116109b557829003601f168201915b5050505050915050610a15565b83836040517faa74a2cb0000000000000000000000000000000000000000000000000000000081526004016107b9929190612de5565b92915050565b6040805173ffffffffffffffffffffffffffffffffffffffff8516602080830191909152818301849052825180830384018152606090920190925280519101206000610a678483612074565b9050610a7482868361215a565b6040805173ffffffffffffffffffffffffffffffffffffffff838116825260208201869052871681830152905183917fdfa40ee17618caabca7b46eb80031e3d05a27a30de957d29b4a2a71426db5a63919081900360600190a2935093915050565b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff163314610b6257600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016107b9565b6000828152606d6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610bab57610bab61298c565b0217905550817f1cfd8c214b5ba0c1306317bd132fa41ca741da227af86a75e9010708561be80e82604051610be091906129bb565b60405180910390a25050565b847f88632d59d3df3bee2ce2a06fbb05e1c8542c44cb2e7339bb1812500a978644d3858585853334604051610c2696959493929190612e06565b60405180910390a260675473ffffffffffffffffffffffffffffffffffffffff1615610cd2576067546040517f33bb7f9100000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116906333bb7f919034906024016000604051808303818588803b158015610cb857600080fd5b505af1158015610ccc573d6000803e3d6000fd5b50505050505b5050505050565b610ce161226c565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610d3b576040519150601f19603f3d011682016040523d82523d6000602084013e610d40565b606091505b5050905080610d7b576040517f74e6fd0800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff851660208083019190915281830184905282518083038401815260609092019092528051910120610dcb81858561215a565b6040805173ffffffffffffffffffffffffffffffffffffffff858116825260208201859052861681830152905182917fdfa40ee17618caabca7b46eb80031e3d05a27a30de957d29b4a2a71426db5a63919081900360600190a29392505050565b610e3461226c565b610e3e60006122ed565b565b610e4861226c565b73ffffffffffffffffffffffffffffffffffffffff811660008181527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055518281527f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f91015b60405180910390a350565b606c5460ff1680610efa575060695415155b80610f065750606a5415155b80610f1e5750606b8054610f1990612d5d565b151590505b15610f55576040517fc1b1fbf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87600080828152606d602052604090205460ff166002811115610f7a57610f7a61298c565b148015610fb657503360009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f602052604090205460ff16155b15610ff6576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b60016000828152606d602052604090205460ff16600281111561101b5761101b61298c565b14801561104257506000818152606e6020908152604080832033845290915290205460ff16155b15611082576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b8351602080860191909120604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08f811b821683870152602483018f9052604483018e9052606483018590527fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608e901b1660848401528b821660988401528a901b16609c8201528151808203608001815260a0909101825280519084012063ffffffff8e1660009081526068909452922054909190811461119c5763ffffffff8c16600081815260686020526040908190205490517f87e020b800000000000000000000000000000000000000000000000000000000815260048101929092526024820152604481018290526064016107b9565b63ffffffff8c16600090815260686020526040808220829055516002906111c4908890612db0565b602060405180830381855afa1580156111e1573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906112049190612dcc565b90506112128c8c8388612364565b606c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560405160009073ffffffffffffffffffffffffffffffffffffffff8c169063ffffffff8b16908c90611275908b908d90602401612e6c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516112fe9190612db0565b60006040518083038160008787f1925050503d806000811461133c576040519150601f19603f3d011682016040523d82523d6000602084013e611341565b606091505b5050606c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690559050806113aa578987896040517f2b9282960000000000000000000000000000000000000000000000000000000081526004016107b993929190612e9a565b8c8e63ffffffff167f361a2fc76bc9f35b079dd353fd7fdd8aaf61f1a7979cf59653225692c19bbff28e856040516113ec929190918252602082015260400190565b60405180910390a35050505050505050505050505050565b61140c61226c565b60675460405173ffffffffffffffffffffffffffffffffffffffff8084169216907ff0cca8e172b90b70922c6757d918f7a532326dfd3e9f3c5b117a616d2bb0721290600090a3606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000806002866040516114ad9190612db0565b602060405180830381855afa1580156114ca573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906114ed9190612dcc565b8551602080880191909120606754604080517401000000000000000000000000000000000000000090920460e090811b7fffffffff0000000000000000000000000000000000000000000000000000000090811684870152602484018e9052604484018790526064840185905233606081901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166084860152818c166098860152918a901b16609c8401528151608081850301815260a090930190915281519190930120929350916000906067805463ffffffff7401000000000000000000000000000000000000000091829004811660009081526068602052604090819020859055925492519394508d9391909204909116907f22a09d598b323a3c65d69787dd6fd143dd8e4d2f91733c247113167df31e3e9390611639908d908d9088908e908e903490612ef1565b60405180910390a36067805474010000000000000000000000000000000000000000900463ffffffff1690601461166f83612f7a565b825463ffffffff9182166101009390930a92830291909202199091161790555060675473ffffffffffffffffffffffffffffffffffffffff1615611735576067546040517f33bb7f9100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152909116906333bb7f919034906024016000604051808303818588803b15801561171b57600080fd5b505af115801561172f573d6000803e3d6000fd5b50505050505b9998505050505050505050565b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146117ce57600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016107b9565b6000828152606e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155905190815284917f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f9101610845565b606c5460ff168061186d575060695415155b806118795750606a5415155b806118915750606b805461188c90612d5d565b151590505b156118c8576040517fc1b1fbf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85600080828152606d602052604090205460ff1660028111156118ed576118ed61298c565b14801561192957503360009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f602052604090205460ff16155b15611969576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b60016000828152606d602052604090205460ff16600281111561198e5761198e61298c565b1480156119b557506000818152606e6020908152604080832033845290915290205460ff16155b156119f5576040517fb8652814000000000000000000000000000000000000000000000000000000008152600481018290523360248201526044016107b9565b6000600287604051611a079190612db0565b602060405180830381855afa158015611a24573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611a479190612dcc565b90506000600287604051611a5b9190612db0565b602060405180830381855afa158015611a78573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611a9b9190612dcc565b9050611aa989838389612364565b6069899055606a829055606b611abf8882613012565b5060008573ffffffffffffffffffffffffffffffffffffffff1685604051611ae79190612db0565b6000604051808303816000865af19150503d8060008114611b24576040519150601f19603f3d011682016040523d82523d6000602084013e611b29565b606091505b5050905080611b685785856040517f6c544f330000000000000000000000000000000000000000000000000000000081526004016107b992919061312c565b606960009055606a60009055606b6000611b8291906125de565b60408051848152602081018490528b917f41d7122d18af9f0c92f23bcea9d5fa416cadcd1ed2fc8e544a3c89b841ecfd15910160405180910390a250505050505050505050565b600254610100900460ff1615808015611be95750600254600160ff909116105b80611c035750303b158015611c03575060025460ff166001145b611c8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107b9565b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611ced57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611cf6846122ed565b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85811691909117909155821660009081527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611df657600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b604080513360208083019190915281830184905282518083038401815260609092019092528051910120611e30818461244e565b60405173ffffffffffffffffffffffffffffffffffffffff8416815281907ffc14566d4fed0acece30e4fd5b3f5f6dadee9c5ecb852fdaf9c13999c733b7369060200160405180910390a292915050565b611e8961226c565b73ffffffffffffffffffffffffffffffffffffffff811660008181527f136eb4aae73f7618d8559a84c5ff3678edc6b16994db052447ebc43c429b7d6f6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915590519081527f1c19213e895a5cf2a6027ac01d21289130e55827ec6257a8bb946b4c524d408f9101610edd565b611f3161226c565b73ffffffffffffffffffffffffffffffffffffffff8116611fd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107b9565b611fdd816122ed565b50565b60408051336020808301919091528183018490528251808303840181526060909201909252805191012060006120168483612074565b9050612022828261244e565b60405173ffffffffffffffffffffffffffffffffffffffff8216815282907ffc14566d4fed0acece30e4fd5b3f5f6dadee9c5ecb852fdaf9c13999c733b7369060200160405180910390a29250929050565b600082516000036120b1576040517f21744a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff811661210a576040517f4102e83a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8251602084012060405173ffffffffffffffffffffffffffffffffffffffff83169184917f27b8e3132afa95254770e1c1d214eafde52bc47d1b6e1f5dfcbb380c3ca3f53290600090a492915050565b73ffffffffffffffffffffffffffffffffffffffff81166121a7576040517fb52347c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526020819052604090205473ffffffffffffffffffffffffffffffffffffffff1615612206576040517f5e34c78f000000000000000000000000000000000000000000000000000000008152600481018490526024016107b9565b600092835260016020908152604080852080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff968716179091559185905290932080549093169116179055565b60355473ffffffffffffffffffffffffffffffffffffffff163314610e3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107b9565b6035805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600084815260208190526040908190205490517fde12c64000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690819063de12c640906123cd9087908790879060040161315b565b6020604051808303816000875af11580156123ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612410919061317a565b610cd257808484846040517fb638a0980000000000000000000000000000000000000000000000000000000081526004016107b9949392919061319c565b73ffffffffffffffffffffffffffffffffffffffff811661249b576040517fb52347c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090205473ffffffffffffffffffffffffffffffffffffffff16331461252757600082815260016020526040908190205490517f66d1ead600000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016107b9565b60008281526020819052604090205473ffffffffffffffffffffffffffffffffffffffff9081169082160361258b576040517f21d0cb4d000000000000000000000000000000000000000000000000000000008152600481018390526024016107b9565b60009182526020829052604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b5080546125ea90612d5d565b6000825580601f106125fa575050565b601f016020900490600052602060002090810190611fdd91905b808211156126285760008155600101612614565b5090565b803563ffffffff8116811461264057600080fd5b919050565b60006020828403121561265757600080fd5b6126608261262c565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461264057600080fd5b6000806040838503121561269e57600080fd5b823591506126ae60208401612667565b90509250929050565b60005b838110156126d25781810151838201526020016126ba565b50506000910152565b600081518084526126f38160208601602086016126b7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061266060208301846126db565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261277857600080fd5b813567ffffffffffffffff8082111561279357612793612738565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156127d9576127d9612738565b816040528381528660208588010111156127f257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561282557600080fd5b82359150602083013567ffffffffffffffff81111561284357600080fd5b61284f85828601612767565b9150509250929050565b60008060006060848603121561286e57600080fd5b61287784612667565b9250602084013567ffffffffffffffff81111561289357600080fd5b61289f86828701612767565b925050604084013590509250925092565b600080604083850312156128c357600080fd5b823591506020830135600381106128d957600080fd5b809150509250929050565b600080600080600060a086880312156128fc57600080fd5b85359450602086013567ffffffffffffffff8082111561291b57600080fd5b61292789838a01612767565b955061293560408901612667565b9450606088013591508082111561294b57600080fd5b5061295888828901612767565b9250506129676080870161262c565b90509295509295909350565b60006020828403121561298557600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106129f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215612a0f57600080fd5b612a1883612667565b946020939093013593505050565b600080600060608486031215612a3b57600080fd5b612a4484612667565b9250612a5260208501612667565b9150604084013590509250925092565b600060208284031215612a7457600080fd5b61266082612667565b80357fffffffff000000000000000000000000000000000000000000000000000000008116811461264057600080fd5b60008060008060008060008060006101208a8c031215612acc57600080fd5b612ad58a61262c565b985060208a0135975060408a01359650612af160608b01612667565b9550612aff60808b01612a7d565b9450612b0d60a08b0161262c565b935060c08a013567ffffffffffffffff80821115612b2a57600080fd5b612b368d838e01612767565b945060e08c0135915080821115612b4c57600080fd5b612b588d838e01612767565b93506101008c0135915080821115612b6f57600080fd5b50612b7c8c828d01612767565b9150509295985092959850929598565b600080600080600060a08688031215612ba457600080fd5b85359450602086013567ffffffffffffffff80821115612bc357600080fd5b612bcf89838a01612767565b95506040880135915080821115612be557600080fd5b50612bf288828901612767565b935050612c0160608701612a7d565b91506129676080870161262c565b60008060008060008060c08789031215612c2857600080fd5b86359550602087013567ffffffffffffffff80821115612c4757600080fd5b612c538a838b01612767565b96506040890135915080821115612c6957600080fd5b612c758a838b01612767565b95506060890135915080821115612c8b57600080fd5b612c978a838b01612767565b9450612ca560808a01612667565b935060a0890135915080821115612cbb57600080fd5b50612cc889828a01612767565b9150509295509295509295565b600080600060608486031215612cea57600080fd5b612cf384612667565b9250612d0160208501612667565b9150612d0f60408501612667565b90509250925092565b60008060408385031215612d2b57600080fd5b823567ffffffffffffffff811115612d4257600080fd5b612d4e85828601612767565b95602094909401359450505050565b600181811c90821680612d7157607f821691505b602082108103612daa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008251612dc28184602087016126b7565b9190910192915050565b600060208284031215612dde57600080fd5b5051919050565b828152604060208201526000612dfe60408301846126db565b949350505050565b60c081526000612e1960c08301896126db565b73ffffffffffffffffffffffffffffffffffffffff80891660208501528382036040850152612e4882896126db565b63ffffffff9790971660608501529490941660808301525060a00152509392505050565b604081526000612e7f60408301856126db565b8281036020840152612e9181856126db565b95945050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000084168152606060208201526000612ed560608301856126db565b8281036040840152612ee781856126db565b9695505050505050565b60c081526000612f0460c08301896126db565b8281036020840152612f1681896126db565b91505073ffffffffffffffffffffffffffffffffffffffff861660408301527fffffffff000000000000000000000000000000000000000000000000000000008516606083015263ffffffff841660808301528260a0830152979650505050505050565b600063ffffffff808316818103612fba577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b601f821115610d7b57600081815260208120601f850160051c81016020861015612feb5750805b601f850160051c820191505b8181101561300a57828155600101612ff7565b505050505050565b815167ffffffffffffffff81111561302c5761302c612738565b6130408161303a8454612d5d565b84612fc4565b602080601f831160018114613093576000841561305d5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561300a565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156130e0578886015182559484019460019091019084016130c1565b508582101561311c57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000612dfe60408301846126db565b838152826020820152606060408201526000612e9160608301846126db565b60006020828403121561318c57600080fd5b8151801515811461266057600080fd5b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152826040820152608060608201526000612ee760808301846126db56fea2646970667358221220444dd9b1ca4e73d249637cb2342eb328a12daa5ecfd87cbbcb8ca87fd3b9e61a64736f6c63430008100033

Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.