Base Sepolia Testnet

Contract

0x7EadB9d0777fe2f8061c652135EB4db0AA51A281

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Parent Transaction Hash Block From To
247875462025-04-22 17:36:2016 hrs ago1745343380  Contract Creation0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RandomnessSender

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at sepolia.basescan.org on 2025-04-22
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8 ^0.8.20 ^0.8.22;

// lib/openzeppelin-contracts/contracts/access/IAccessControl.sol

// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

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

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

/**
 * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
 */
interface IERC1967 {
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);
}

// lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol

// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC1822.sol)

/**
 * @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

// lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol

// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {UpgradeableBeacon} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

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

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

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

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

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

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC-1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * TIP: Consider using this library along with {SlotDerivation}.
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct Int256Slot {
        int256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Int256Slot` with member `value` located at `slot`.
     */
    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        assembly ("memory-safe") {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns a `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        assembly ("memory-safe") {
            r.slot := store.slot
        }
    }
}

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

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

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

// lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol

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

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._positions[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._positions[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        assembly ("memory-safe") {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly ("memory-safe") {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly ("memory-safe") {
            result := store
        }

        return result;
    }
}

// lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol

// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.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 Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 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 in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._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 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._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() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @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 {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

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

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

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

// src/interfaces/IRandomnessReceiver.sol

/// @title IRandomnessReceiver interface
/// @author Randamu
/// @notice Interface for randomness consumer contracts that receive randomness via callbacks.
interface IRandomnessReceiver {
    /// @notice Receives a random value associated with a specific request.
    /// @dev This function is called to provide the randomness generated for a given request ID.
    /// It is intended to be called by a trusted source that provides randomness.
    /// @param requestID The unique identifier of the randomness request.
    /// @param randomness The generated random value, provided as a `bytes32` type.
    function receiveRandomness(uint256 requestID, bytes32 randomness) external;
}

// src/interfaces/ISignatureReceiver.sol

/// @title ISignatureReceiver interface
/// @author Randamu
/// @notice Interface for contracts receiving signatures via callbacks.
interface ISignatureReceiver {
    /// @notice Receives a signature for a specified request.
    /// @dev This function is intended to be called to provide a signature for the given `requestID`.
    /// @param requestID The unique identifier of the request associated with the signature.
    /// @param signature The cryptographic signature of the message, provided as a byte array.
    function receiveSignature(uint256 requestID, bytes calldata signature) external;
}

// src/libraries/ModExp.sol

library ModUtils {
    /// @dev Wraps the modular exponent pre-compile introduced in Byzantium.
    ///      Returns base^exponent mod p.
    function modExp(uint256 base, uint256 exponent, uint256 p) internal view returns (uint256 o) {
        assembly {
            // Args for the precompile: [<length_of_BASE> <length_of_EXPONENT>
            // <length_of_MODULUS> <BASE> <EXPONENT> <MODULUS>]
            let output := mload(0x40)
            let args := add(output, 0x20)
            mstore(args, 0x20)
            mstore(add(args, 0x20), 0x20)
            mstore(add(args, 0x40), 0x20)
            mstore(add(args, 0x60), base)
            mstore(add(args, 0x80), exponent)
            mstore(add(args, 0xa0), p)

            // 0x05 is the modular exponent contract address
            if iszero(staticcall(not(0), 0x05, args, 0xc0, output, 0x20)) { revert(0, 0) }
            o := mload(output)
        }
    }
}

/// @title Compute Inverse by Modular Exponentiation
/// @notice Compute $input^(N - 2) mod N$ using Addition Chain method.
/// Where     N = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
/// and   N - 2 = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd45
/// @dev the function body is generated with the modified addchain script
/// see https://github.com/kobigurk/addchain/commit/2c37a2ace567a9bdc680b4e929c94aaaa3ec700f
/// Adapted from https://github.com/kobigurk/addchain/commit/2c37a2ace567a9bdc680b4e929c94aaaa3ec700f
library ModexpInverse {
    function run(uint256 t2) internal pure returns (uint256 t0) {
        assembly {
            let n := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
            t0 := mulmod(t2, t2, n)
            let t5 := mulmod(t0, t2, n)
            let t1 := mulmod(t5, t0, n)
            let t3 := mulmod(t5, t5, n)
            let t8 := mulmod(t1, t0, n)
            let t4 := mulmod(t3, t5, n)
            let t6 := mulmod(t3, t1, n)
            t0 := mulmod(t3, t3, n)
            let t7 := mulmod(t8, t3, n)
            t3 := mulmod(t4, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t7, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t7, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t7, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
        }
    }
}

/// @title Compute Square Root by Modular Exponentiation
/// @notice Compute $input^{(N + 1) / 4} mod N$ using Addition Chain method.
/// Where           N = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47
/// and   (N + 1) / 4 = 0xc19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52
library ModexpSqrt {
    function run(uint256 t6) internal pure returns (uint256 t0) {
        assembly {
            let n := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47

            t0 := mulmod(t6, t6, n)
            let t4 := mulmod(t0, t6, n)
            let t2 := mulmod(t4, t0, n)
            let t3 := mulmod(t4, t4, n)
            let t8 := mulmod(t2, t0, n)
            let t1 := mulmod(t3, t4, n)
            let t5 := mulmod(t3, t2, n)
            t0 := mulmod(t3, t3, n)
            let t7 := mulmod(t8, t3, n)
            t3 := mulmod(t1, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t7, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t7, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t8, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t7, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t6, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t5, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t4, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t3, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t2, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t0, n)
            t0 := mulmod(t0, t1, n)
            t0 := mulmod(t0, t0, n)
        }
    }
}

// lib/openzeppelin-contracts/contracts/access/extensions/IAccessControlEnumerable.sol

// OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/IAccessControlEnumerable.sol)

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC-165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert Errors.InsufficientBalance(address(this).balance, amount);
        }

        (bool success, bytes memory returndata) = recipient.call{value: amount}("");
        if (!success) {
            _revert(returndata);
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) 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
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

// lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol

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

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

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

// src/libraries/BLS.sol

/// @title  Boneh–Lynn–Shacham (BLS) signature scheme on Barreto-Naehrig 254 bit curve (BN-254) used to verify BLS signaturess on the BN254 curve in Solidity
/// @notice We use BLS signature aggregation to reduce the size of signature data to store on chain.
/// @dev We can use G1 points for signatures and messages, and G2 points for public keys or vice versa
/// @dev G1 is 64 bytes (uint256[2] in Solidity) and G2 is 128 bytes (uint256[4] in Solidity)
/// @dev Adapted from https://github.com/kevincharm/bls-bn254.git
library BLS {
    struct PointG1 {
        uint256 x;
        uint256 y;
    }

    struct PointG2 {
        uint256[2] x; // x coordinate (represented as 2 uint256 values) / Fp2 coordinates
        uint256[2] y; // y coordinate (represented as 2 uint256 values) / Fp2 coordinates
    }

    // GfP2 implements a field of size p² as a quadratic extension of the base field.
    struct GfP2 {
        uint256 x;
        uint256 y;
    }

    // Field order
    // p is a prime over which we form a basic field
    // go-ethereum/crypto/bn256/cloudflare/constants.go
    uint256 private constant N = 21888242871839275222246405745257275088696311157297823662689037894645226208583;

    // Generator of G1
    uint256 private constant G1_X = 1;
    uint256 private constant G1_Y = 2;

    // Negated generator of G1
    uint256 private constant N_G1_X = 1;
    uint256 private constant N_G1_Y = 21888242871839275222246405745257275088696311157297823662689037894645226208581;

    // Negated generator of G2
    uint256 private constant N_G2_X1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;
    uint256 private constant N_G2_X0 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
    uint256 private constant N_G2_Y1 = 17805874995975841540914202342111839520379459829704422454583296818431106115052;
    uint256 private constant N_G2_Y0 = 13392588948715843804641432497768002650278120570034223513918757245338268106653;

    uint256 private constant T24 = 0x1000000000000000000000000000000000000000000000000;
    uint256 private constant MASK24 = 0xffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice Param A of BN254
    uint256 private constant A = 0;
    /// @notice Param B of BN254
    uint256 private constant B = 3;
    /// @notice Param Z for SVDW over E
    uint256 private constant Z = 1;
    /// @notice g(Z) where g(x) = x^3 + 3
    uint256 private constant C1 = 0x4;
    /// @notice -Z / 2 (mod N)
    uint256 private constant C2 = 0x183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3;
    /// @notice C3 = sqrt(-g(Z) * (3 * Z^2 + 4 * A)) (mod N)
    ///     and sgn0(C3) == 0
    uint256 private constant C3 = 0x16789af3a83522eb353c98fc6b36d713d5d8d1cc5dffffffa;
    /// @notice 4 * -g(Z) / (3 * Z^2 + 4 * A) (mod N)
    uint256 private constant C4 = 0x10216f7ba065e00de81ac1e7808072c9dd2b2385cd7b438469602eb24829a9bd;
    /// @notice (N - 1) / 2
    uint256 private constant C5 = 0x183227397098d014dc2822db40c0ac2ecbc0b548b438e5469e10460b6c3e7ea3;

    error BNAddFailed(uint256[4] input);
    error InvalidFieldElement(uint256 x);
    error MapToPointFailed(uint256 noSqrt);
    error InvalidDSTLength(bytes dst);
    error ModExpFailed(uint256 base, uint256 exponent, uint256 modulus);

    /// @notice Computes the negation of a point on the G1 curve.
    /// @dev Returns the negation of the input point p on the elliptic curve.
    ///      If the point is at infinity (x = 0, y = 0), it returns the point
    ///      itself. Otherwise, it returns a new point with the same x-coordinate
    ///      and the negated y-coordinate modulo the curve's prime N.
    /// @param p The point on the G1 curve to negate.
    /// @return The negated point on the G1 curve, such that p + negate(p) = 0.
    function negate(PointG1 memory p) internal pure returns (PointG1 memory) {
        // The prime q in the base field F_q for G1
        if (p.x == 0 && p.y == 0) {
            return PointG1(0, 0);
        } else {
            return PointG1(p.x, N - (p.y % N));
        }
    }

    /// @notice Adds two points on the G1 curve.
    /// @dev Uses the precompiled contract at address 0x06 to perform
    ///      elliptic curve point addition in the G1 group. This function
    ///      returns the resulting point r = p1 + p2.
    /// @dev Reverts if the point addition operation fails.
    /// @param p1 The first point on the G1 curve.
    /// @param p2 The second point on the G1 curve.
    /// @return r The resulting point from adding p1 and p2 on the G1 curve.
    function addG1Points(PointG1 memory p1, PointG1 memory p2) internal view returns (PointG1 memory r) {
        uint256[4] memory input;
        input[0] = p1.x;
        input[1] = p1.y;
        input[2] = p2.x;
        input[3] = p2.y;
        bool success;

        assembly {
            success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)
        }

        require(success, "G1 addition failed");
    }

    /// @notice Performs scalar multiplication of a point on the G1 curve.
    /// @dev Uses the precompiled contract at address 0x07 to perform
    ///      scalar multiplication of a point on the G1 curve, i.e.,
    ///      computes r = s * p, where s is the scalar and p is the point.
    /// @dev Reverts if the scalar multiplication operation fails.
    /// @param p The point on the G1 curve to be multiplied.
    /// @param s The scalar value to multiply the point by.
    /// @return r The resulting point from scalar multiplication, r = s * p.
    function scalarMulG1Point(PointG1 memory p, uint256 s) internal view returns (PointG1 memory r) {
        uint256[3] memory input;
        input[0] = p.x;
        input[1] = p.y;
        input[2] = s;
        bool success;
        assembly {
            success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)
        }
        require(success, "G1 scalar multiplication failed");
    }

    /// @notice Compute a scalar multiplication with a scalar and the base point.
    function scalarMulG1Base(uint256 s) internal view returns (PointG1 memory r) {
        uint256[3] memory input;
        input[0] = G1_X;
        input[1] = G1_Y;
        input[2] = s;
        bool success;
        assembly {
            success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)
        }
        require(success, "G1 scalar multiplication failed");
    }

    /// @notice Verify signed message on g1 against signature on g1 and public key on g2
    /// @param signature Signature to check
    /// @param pubkey Public key of signer
    /// @param message Message to check
    /// @return pairingSuccess bool indicating if the pairing check was successful
    /// @return callSuccess bool indicating if the static call to the evm precompile was successful
    function verifySingle(PointG1 memory signature, PointG2 memory pubkey, PointG1 memory message)
        internal
        view
        returns (bool pairingSuccess, bool callSuccess)
    {
        uint256[12] memory input = [
            signature.x,
            signature.y,
            N_G2_X1,
            N_G2_X0,
            N_G2_Y1,
            N_G2_Y0,
            message.x,
            message.y,
            pubkey.x[1],
            pubkey.x[0],
            pubkey.y[1],
            pubkey.y[0]
        ];
        uint256[1] memory out;
        assembly {
            callSuccess := staticcall(sub(gas(), 2000), 8, input, 384, out, 0x20)
        }
        return (out[0] != 0, callSuccess);
    }

    /// @notice Verifies that the same scalar is used in both rG1 and rG2.
    function verifyEqualityG1G2(PointG1 memory rG1, PointG2 memory rG2)
        internal
        view
        returns (bool pairingSuccess, bool callSuccess)
    {
        uint256[12] memory input =
            [rG1.x, rG1.y, N_G2_X1, N_G2_X0, N_G2_Y1, N_G2_Y0, G1_X, G1_Y, rG2.x[1], rG2.x[0], rG2.y[1], rG2.y[0]];
        uint256[1] memory out;
        assembly {
            callSuccess := staticcall(sub(gas(), 2000), 8, input, 384, out, 0x20)
        }
        return (out[0] != 0, callSuccess);
    }

    /// @notice Verify signed message on g2 against signature on g2 and public key on g1
    /// @param signature Signature to check
    /// @param pubkey Public key of signer
    /// @param message Message to check
    /// @return pairingSuccess bool indicating if the pairing check was successful
    /// @return callSuccess bool indicating if the static call to the evm precompile was successful
    function verifySingleG2(PointG2 memory signature, PointG1 memory pubkey, PointG2 memory message)
        internal
        view
        returns (bool pairingSuccess, bool callSuccess)
    {
        uint256[12] memory input = [
            N_G1_X,
            N_G1_Y,
            signature.x[1],
            signature.x[0],
            signature.y[1],
            signature.y[0],
            pubkey.x,
            pubkey.y,
            message.x[1],
            message.x[0],
            message.y[1],
            message.y[0]
        ];
        uint256[1] memory out;
        assembly {
            callSuccess := staticcall(sub(gas(), 2000), 8, input, 384, out, 0x20)
        }
        return (out[0] != 0, callSuccess);
    }

    /// @notice Hash to BN254 G1
    /// @param domain Domain separation tag
    /// @param message Message to hash
    /// @return point in G1
    function hashToPoint(bytes memory domain, bytes memory message) internal view returns (PointG1 memory point) {
        uint256[2] memory u = hashToField(domain, message);
        uint256[2] memory p0 = mapToPoint(u[0]);
        uint256[2] memory p1 = mapToPoint(u[1]);
        uint256[4] memory bnAddInput;
        bnAddInput[0] = p0[0];
        bnAddInput[1] = p0[1];
        bnAddInput[2] = p1[0];
        bnAddInput[3] = p1[1];
        bool success;
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            success := staticcall(sub(gas(), 2000), 6, bnAddInput, 128, p0, 64)
        }
        if (!success) revert BNAddFailed(bnAddInput);
        point = PointG1({x: p0[0], y: p0[1]});
        return point;
    }

    /// @notice Check if point in g1 is a valid
    /// @param point The point on g1 to check
    function isValidPointG1(PointG1 memory point) internal pure returns (bool) {
        if ((point.x >= N) || (point.y >= N)) {
            return false;
        } else {
            return isOnCurveG1(point);
        }
    }

    /// @notice Check if point is a valid g2 point
    /// @param point the point to check
    function isValidPointG2(PointG2 memory point) internal pure returns (bool) {
        if ((point.x[0] >= N) || (point.x[1] >= N) || (point.y[0] >= N || (point.y[1] >= N))) {
            return false;
        } else {
            return isOnCurveG2(point);
        }
    }

    /// @notice Check if `point` is in G1
    /// @param p Point to check
    function isOnCurveG1(PointG1 memory p) internal pure returns (bool _isOnCurve) {
        uint256[2] memory point = [p.x, p.y];
        assembly {
            let t0 := mload(point)
            let t1 := mload(add(point, 32))
            let t2 := mulmod(t0, t0, N)
            t2 := mulmod(t2, t0, N)
            t2 := addmod(t2, 3, N)
            t1 := mulmod(t1, t1, N)
            _isOnCurve := eq(t1, t2)
        }
    }

    /// @notice Check if `point` is in G2
    /// @param p Point to check
    function isOnCurveG2(PointG2 memory p) internal pure returns (bool _isOnCurve) {
        uint256[4] memory point = [p.x[0], p.x[1], p.y[0], p.y[1]];
        assembly {
            // x0, x1
            let t0 := mload(point)
            let t1 := mload(add(point, 32))
            // x0 ^ 2
            let t2 := mulmod(t0, t0, N)
            // x1 ^ 2
            let t3 := mulmod(t1, t1, N)
            // 3 * x0 ^ 2
            let t4 := add(add(t2, t2), t2)
            // 3 * x1 ^ 2
            let t5 := addmod(add(t3, t3), t3, N)
            // x0 * (x0 ^ 2 - 3 * x1 ^ 2)
            t2 := mulmod(add(t2, sub(N, t5)), t0, N)
            // x1 * (3 * x0 ^ 2 - x1 ^ 2)
            t3 := mulmod(add(t4, sub(N, t3)), t1, N)

            // x ^ 3 + b
            t0 := addmod(t2, 0x2b149d40ceb8aaae81be18991be06ac3b5b4c5e559dbefa33267e6dc24a138e5, N)
            t1 := addmod(t3, 0x009713b03af0fed4cd2cafadeed8fdf4a74fa084e52d1852e4a2bd0685c315d2, N)

            // y0, y1
            t2 := mload(add(point, 64))
            t3 := mload(add(point, 96))
            // y ^ 2
            t4 := mulmod(addmod(t2, t3, N), addmod(t2, sub(N, t3), N), N)
            t3 := mulmod(shl(1, t2), t3, N)

            // y ^ 2 == x ^ 3 + b
            _isOnCurve := and(eq(t0, t4), eq(t1, t3))
        }
    }

    /// @notice Check if `signature` is a valid signature
    /// @param signature Signature to check
    function isValidSignature(uint256[2] memory signature) internal pure returns (bool) {
        if ((signature[0] >= N) || (signature[1] >= N)) {
            return false;
        }
        return isOnCurveG1(PointG1({x: signature[0], y: signature[1]}));
    }

    /// @notice Check if `publicKey` is a valid public key
    /// @param publicKey PK to check
    function isValidPublicKey(uint256[4] memory publicKey) internal pure returns (bool) {
        if ((publicKey[0] >= N) || (publicKey[1] >= N) || (publicKey[2] >= N || (publicKey[3] >= N))) {
            return false;
        }
        return isOnCurveG2(PointG2({x: [publicKey[0], publicKey[1]], y: [publicKey[2], publicKey[3]]}));
    }

    /// @notice Unmarshals a point on G1 from bytes in an uncompressed form.
    function g1Unmarshal(bytes memory m) internal pure returns (PointG1 memory) {
        require(m.length == 64, "Invalid G1 bytes length");

        bytes32 x;
        bytes32 y;

        assembly {
            x := mload(add(m, 0x20))
            y := mload(add(m, 0x40))
        }

        return PointG1(uint256(x), uint256(y));
    }

    /// @notice Marshals a point on G1 to bytes form.
    function g1Marshal(PointG1 memory point) internal pure returns (bytes memory) {
        bytes memory m = new bytes(64);
        bytes32 x = bytes32(point.x);
        bytes32 y = bytes32(point.y);

        assembly {
            mstore(add(m, 32), x)
            mstore(add(m, 64), y)
        }

        return m;
    }

    /// @dev Unmarshals a point on G2 from bytes in an uncompressed form.
    function g2Unmarshal(bytes memory m) internal pure returns (PointG2 memory) {
        require(m.length == 128, "Invalid G2 bytes length");

        uint256 xx;
        uint256 xy;
        uint256 yx;
        uint256 yy;

        assembly {
            xx := mload(add(m, 0x20))
            xy := mload(add(m, 0x40))
            yx := mload(add(m, 0x60))
            yy := mload(add(m, 0x80))
        }

        return PointG2([xx, xy], [yx, yy]);
    }

    function g2Marshal(PointG2 memory point) internal pure returns (bytes memory) {
        bytes memory m = new bytes(128);
        bytes32 xx = bytes32(point.x[0]);
        bytes32 xy = bytes32(point.x[1]);
        bytes32 yx = bytes32(point.y[0]);
        bytes32 yy = bytes32(point.y[1]);

        assembly {
            mstore(add(m, 0x20), xx)
            mstore(add(m, 0x40), xy)
            mstore(add(m, 0x60), yx)
            mstore(add(m, 0x80), yy)
        }

        return m;
    }

    /// @notice sqrt(xx) mod N
    /// @param xx Input
    function sqrt(uint256 xx) internal pure returns (uint256 x, bool hasRoot) {
        x = ModexpSqrt.run(xx);
        hasRoot = mulmod(x, x, N) == xx;
    }

    /// @notice a^{-1} mod N
    /// @param a Input
    function inverse(uint256 a) internal pure returns (uint256) {
        return ModexpInverse.run(a);
    }

    /// @notice Hash a message to the field
    /// @param domain Domain separation tag
    /// @param message Message to hash
    function hashToField(bytes memory domain, bytes memory message) internal pure returns (uint256[2] memory) {
        bytes memory _msg = expandMsgTo96(domain, message);
        uint256 u0;
        uint256 u1;
        uint256 a0;
        uint256 a1;
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            let p := add(_msg, 24)
            u1 := and(mload(p), MASK24)
            p := add(_msg, 48)
            u0 := and(mload(p), MASK24)
            a0 := addmod(mulmod(u1, T24, N), u0, N)
            p := add(_msg, 72)
            u1 := and(mload(p), MASK24)
            p := add(_msg, 96)
            u0 := and(mload(p), MASK24)
            a1 := addmod(mulmod(u1, T24, N), u0, N)
        }
        return [a0, a1];
    }

    function hashToFieldSingle(bytes memory domain, bytes memory message) internal pure returns (uint256) {
        bytes memory _msg = expandMsg(domain, message, 48);
        uint256 u0;
        uint256 u1;
        uint256 a0;
        // solium-disable-next-line security/no-inline-assembly
        assembly {
            let p := add(_msg, 24)
            u1 := and(mload(p), MASK24)
            p := add(_msg, 48)
            u0 := and(mload(p), MASK24)
            a0 := addmod(mulmod(u1, T24, N), u0, N)
        }
        return a0;
    }

    /// @notice Expand arbitrary message to n bytes, as described
    ///     in rfc9380 section 5.3.1, using H = keccak256.
    /// @param DST Domain separation tagimport {console} from "forge-std/console.sol";

    /// @param message Message to expand
    function expandMsg(bytes memory DST, bytes memory message, uint8 n_bytes) internal pure returns (bytes memory) {
        uint256 domainLen = DST.length;
        if (domainLen > 255) {
            revert InvalidDSTLength(DST);
        }
        bytes memory zpad = new bytes(136);
        bytes memory b_0 = abi.encodePacked(zpad, message, uint8(0), n_bytes, uint8(0), DST, uint8(domainLen));
        bytes32 b0 = keccak256(b_0);

        bytes memory b_i = abi.encodePacked(b0, uint8(1), DST, uint8(domainLen));
        bytes32 bi = keccak256(b_i);
        bytes memory out = new bytes(n_bytes);
        uint256 ell = (n_bytes + uint256(31)) >> 5;
        for (uint256 i = 1; i < ell; i++) {
            b_i = abi.encodePacked(b0 ^ bi, uint8(1 + i), DST, uint8(domainLen));
            assembly {
                let p := add(32, out)
                p := add(p, mul(32, sub(i, 1)))
                mstore(p, bi)
            }
            bi = keccak256(b_i);
        }
        assembly {
            let p := add(32, out)
            p := add(p, mul(32, sub(ell, 1)))
            mstore(p, bi)
        }
        return out;
    }

    /// @notice Expand arbitrary message to 96 pseudorandom bytes, as described
    ///     in rfc9380 section 5.3.1, using H = keccak256.
    /// @param DST Domain separation tag
    /// @param message Message to expand
    function expandMsgTo96(bytes memory DST, bytes memory message) internal pure returns (bytes memory) {
        uint256 domainLen = DST.length;
        if (domainLen > 255) {
            revert InvalidDSTLength(DST);
        }
        bytes memory zpad = new bytes(136);
        bytes memory b_0 = abi.encodePacked(zpad, message, uint8(0), uint8(96), uint8(0), DST, uint8(domainLen));
        bytes32 b0 = keccak256(b_0);

        bytes memory b_i = abi.encodePacked(b0, uint8(1), DST, uint8(domainLen));
        bytes32 bi = keccak256(b_i);

        bytes memory out = new bytes(96);
        uint256 ell = 3;
        for (uint256 i = 1; i < ell; i++) {
            b_i = abi.encodePacked(b0 ^ bi, uint8(1 + i), DST, uint8(domainLen));
            assembly {
                let p := add(32, out)
                p := add(p, mul(32, sub(i, 1)))
                mstore(p, bi)
            }
            bi = keccak256(b_i);
        }
        assembly {
            let p := add(32, out)
            p := add(p, mul(32, sub(ell, 1)))
            mstore(p, bi)
        }
        return out;
    }

    /// @notice Map field element to E using SvdW
    /// @param u Field element to map
    /// @return p Point on curve
    function mapToPoint(uint256 u) internal view returns (uint256[2] memory p) {
        if (u >= N) revert InvalidFieldElement(u);

        uint256 tv1 = mulmod(mulmod(u, u, N), C1, N);
        uint256 tv2 = addmod(1, tv1, N);
        tv1 = addmod(1, N - tv1, N);
        uint256 tv3 = inverse(mulmod(tv1, tv2, N));
        uint256 tv5 = mulmod(mulmod(mulmod(u, tv1, N), tv3, N), C3, N);
        uint256 x1 = addmod(C2, N - tv5, N);
        uint256 x2 = addmod(C2, tv5, N);
        uint256 tv7 = mulmod(tv2, tv2, N);
        uint256 tv8 = mulmod(tv7, tv3, N);
        uint256 x3 = addmod(Z, mulmod(C4, mulmod(tv8, tv8, N), N), N);

        bool hasRoot;
        uint256 gx;
        if (legendre(g(x1)) == 1) {
            p[0] = x1;
            gx = g(x1);
            (p[1], hasRoot) = sqrt(gx);
            if (!hasRoot) revert MapToPointFailed(gx);
        } else if (legendre(g(x2)) == 1) {
            p[0] = x2;
            gx = g(x2);
            (p[1], hasRoot) = sqrt(gx);
            if (!hasRoot) revert MapToPointFailed(gx);
        } else {
            p[0] = x3;
            gx = g(x3);
            (p[1], hasRoot) = sqrt(gx);
            if (!hasRoot) revert MapToPointFailed(gx);
        }
        if (sgn0(u) != sgn0(p[1])) {
            p[1] = N - p[1];
        }
    }

    /// @notice g(x) = y^2 = x^3 + 3
    function g(uint256 x) private pure returns (uint256) {
        return addmod(mulmod(mulmod(x, x, N), x, N), B, N);
    }

    /// @notice https://datatracker.ietf.org/doc/html/rfc9380#name-the-sgn0-function
    function sgn0(uint256 x) private pure returns (uint256) {
        return x % 2;
    }

    /// @notice Compute Legendre symbol of u
    /// @param u Field element
    /// @return 1 if u is a quadratic residue, -1 if not, or 0 if u = 0 (mod p)
    function legendre(uint256 u) private view returns (int8) {
        uint256 x = modexpLegendre(u);
        if (x == N - 1) {
            return -1;
        }
        if (x != 0 && x != 1) {
            revert MapToPointFailed(u);
        }
        return int8(int256(x));
    }

    /// @notice This is cheaper than an addchain for exponent (N-1)/2
    function modexpLegendre(uint256 u) private view returns (uint256 output) {
        bytes memory input = new bytes(192);
        bool success;
        assembly {
            let p := add(input, 32)
            mstore(p, 32) // len(u)
            p := add(p, 32)
            mstore(p, 32) // len(exp)
            p := add(p, 32)
            mstore(p, 32) // len(mod)
            p := add(p, 32)
            mstore(p, u) // u
            p := add(p, 32)
            mstore(p, C5) // (N-1)/2
            p := add(p, 32)
            mstore(p, N) // N

            success :=
                staticcall(
                    gas(),
                    5,
                    add(input, 32),
                    192,
                    0x00, // scratch space <- result
                    32
                )
            output := mload(0x00) // output <- result
        }
        if (!success) {
            revert ModExpFailed(u, C5, N);
        }
    }
}

// lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165Upgradeable is Initializable, IERC165 {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// src/libraries/TypesLib.sol

/// @title TypesLib
/// @author Randamu
/// @notice Library declaring custom data types used for randomness and blocklock requests
library TypesLib {
    /// @notice Signature request struct for signature request type
    struct SignatureRequest {
        bytes message; // plaintext message to hash and sign
        bytes messageHash; // hashed message to sign
        bytes condition; // optional condition, length can be zero for immediate message signing
        string schemeID; // signature scheme id, e.g., "BN254", "BLS12-381", "TESS"
        address callback; // the requester address to call back. Must implement ISignatureReceiver interface to support the required callback
        bytes signature;
        bool isFulfilled;
    }

    /// @notice  Ciphertext representing data encrypted off-chain
    struct Ciphertext {
        BLS.PointG2 u;
        bytes v;
        bytes w;
    }

    /// @notice  Randomness request stores details needed to verify the signature
    struct RandomnessRequest {
        uint256 nonce;
        address callback;
    }
}

// src/interfaces/IRandomnessSender.sol

/// @title IRandomnessSender interface
/// @author Randamu
/// @notice Interface for randomness sender contract which sends randomness via callbacks to randomness consumer contracts.
interface IRandomnessSender {
    /// @notice Requests the generation of a random value for a specified blockchain height.
    /// @dev Initiates a randomness request.
    /// The generated randomness will be associated with the returned `requestID`.
    /// @return requestID The unique identifier assigned to this randomness request.
    function requestRandomness() external returns (uint256 requestID);

    /// @notice Retrieves a specific request by its ID.
    /// @dev This function returns the Request struct associated with the given requestId.
    /// @param requestId The ID of the request to retrieve.
    /// @return The Request struct corresponding to the given requestId.
    function getRequest(uint256 requestId) external view returns (TypesLib.RandomnessRequest memory);

    /// @notice Sets signatureSender contract address.
    /// @param newSignatureSender The new address to set.
    function setSignatureSender(address newSignatureSender) external;

    /// @notice Retrieves all requests.
    /// @dev This function returns an array of all Request structs stored in the contract.
    /// @return An array containing all the Request structs.
    function getAllRequests() external view returns (TypesLib.RandomnessRequest[] memory);

    /// @notice Generates a message from the given request.
    /// @dev Creates a hash-based message using the `DST` and `nonce` fields of the `Request` struct.
    /// The resulting message is the hash of the encoded values, packed into a byte array.
    /// @param r The `Request` struct containing the data for generating the message.
    /// @return A byte array representing the hashed and encoded message.
    function messageFrom(TypesLib.RandomnessRequest memory r) external pure returns (bytes memory);
}

// src/interfaces/ISignatureSender.sol

/// @title ISignatureSender interface
/// @author Randamu
/// @notice Enables signature requests and callbacks
interface ISignatureSender {
    /// @notice Requests a digital signature for a given message using a specified signature scheme.
    /// @dev Initiates a request for signing the provided `message` under the specified `schemeID`.
    /// @param schemeID The identifier of the signature scheme to be used.
    /// @param message The message to be signed, provided as a byte array.
    /// @param condition Conditions that must be satisfied for the signature request, provided as a byte array.
    /// @return The unique request ID assigned to this signature request.
    function requestSignature(string calldata schemeID, bytes calldata message, bytes calldata condition)
        external
        returns (uint256);

    /// @notice Fulfills a signature request by providing the corresponding signature.
    /// @dev Completes the signing process for the request identified by `requestID`.
    /// @param requestID The unique identifier of the signature request being fulfilled.
    /// @param signature The generated signature, provided as a byte array.
    function fulfilSignatureRequest(uint256 requestID, bytes calldata signature) external;

    /// @notice Retries a request that previously failed during callback.
    /// @dev This function is called if a signature was generated off-chain but failed to call back into the contract.
    /// @param requestID The unique identifier for the signature request.
    function retryCallback(uint256 requestID) external;

    /// @notice Updates the signature scheme address provider contract address.
    /// @param newSignatureSchemeAddressProvider The signature address provider address to set.
    function setSignatureSchemeAddressProvider(address newSignatureSchemeAddressProvider) external;

    /// @notice Checks if a signature request is still in flight.
    /// @dev Determines whether the specified `requestID` is still pending.
    /// @param requestID The unique identifier of the signature request.
    /// @return True if the request is still in flight, otherwise false.
    function isInFlight(uint256 requestID) external view returns (bool);

    /// @notice Returns request data.
    /// @param requestID The unique identifier of the signature request.
    /// @return The corresponding SignatureRequest struct for the request ID.
    function getRequest(uint256 requestID) external view returns (TypesLib.SignatureRequest memory);

    /// @notice Returns whether a specific request errored during callback or not.
    /// @param requestID The ID of the request to check.
    /// @return Boolean indicating whether the request has errored or not.
    function hasErrored(uint256 requestID) external view returns (bool);

    /// @notice Retrieves the public key associated with the signature process.
    /// @dev Returns the public key as two elliptic curve points.
    /// @return Two pairs of coordinates representing the public key points on the elliptic curve.
    function getPublicKey() external view returns (uint256[2] memory, uint256[2] memory);

    /// @notice Retrieves the public key associated with the signature process.
    /// @dev Returns the public key as bytes.
    /// @return Bytes string representing the public key points on the elliptic curve.
    function getPublicKeyBytes() external view returns (bytes memory);

    /// @notice Returns all the fulfilled request IDs.
    /// @return A uint array representing a set containing all fulfilled request IDs.
    function getAllFulfilledRequestIds() external view returns (uint256[] memory);

    /// @notice Returns all the request IDs that are yet to be fulfilled.
    /// @return A uint array representing a set containing all request IDs that are yet to be fulfilled.
    function getAllUnfulfilledRequestIds() external view returns (uint256[] memory);

    /// @notice Returns all the request IDs where the callback reverted but a decryption key was provided.
    /// @return A uint array representing a set containing all request IDs with reverting callbacks.
    function getAllErroredRequestIds() external view returns (uint256[] memory);

    /// @notice Returns count of all the request IDs that are yet to be fulfilled.
    /// @return A uint representing a count of all request IDs that are yet to be fulfilled.
    function getCountOfUnfulfilledRequestIds() external view returns (uint256);

    /// @notice Returns the version number of the upgradeable contract.
    function version() external pure returns (string memory);
}

// lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol

// OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol)

/**
 * @dev This library provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.
 */
library ERC1967Utils {
    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev The `implementation` of the proxy is invalid.
     */
    error ERC1967InvalidImplementation(address implementation);

    /**
     * @dev The `admin` of the proxy is invalid.
     */
    error ERC1967InvalidAdmin(address admin);

    /**
     * @dev The `beacon` of the proxy is invalid.
     */
    error ERC1967InvalidBeacon(address beacon);

    /**
     * @dev An upgrade function sees `msg.value > 0` that may be lost.
     */
    error ERC1967NonPayable();

    /**
     * @dev Returns the current implementation address.
     */
    function getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the ERC-1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        if (newImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(newImplementation);
        }
        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Performs implementation upgrade with additional setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) internal {
        _setImplementation(newImplementation);
        emit IERC1967.Upgraded(newImplementation);

        if (data.length > 0) {
            Address.functionDelegateCall(newImplementation, data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Returns the current admin.
     *
     * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using
     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
     */
    function getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the ERC-1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        if (newAdmin == address(0)) {
            revert ERC1967InvalidAdmin(address(0));
        }
        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {IERC1967-AdminChanged} event.
     */
    function changeAdmin(address newAdmin) internal {
        emit IERC1967.AdminChanged(getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Returns the current beacon.
     */
    function getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the ERC-1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        if (newBeacon.code.length == 0) {
            revert ERC1967InvalidBeacon(newBeacon);
        }

        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;

        address beaconImplementation = IBeacon(newBeacon).implementation();
        if (beaconImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(beaconImplementation);
        }
    }

    /**
     * @dev Change the beacon and trigger a setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-BeaconUpgraded} event.
     *
     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
     * efficiency.
     */
    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
        _setBeacon(newBeacon);
        emit IERC1967.BeaconUpgraded(newBeacon);

        if (data.length > 0) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
     * if an upgrade doesn't perform an initialization call.
     */
    function _checkNonPayable() private {
        if (msg.value > 0) {
            revert ERC1967NonPayable();
        }
    }
}

// lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol

// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
    struct AccessControlStorage {
        mapping(bytes32 role => RoleData) _roles;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;

    function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
        assembly {
            $.slot := AccessControlStorageLocation
        }
    }

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        return $._roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        return $._roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        AccessControlStorage storage $ = _getAccessControlStorage();
        bytes32 previousAdminRole = getRoleAdmin(role);
        $._roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (!hasRole(role, account)) {
            $._roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        AccessControlStorage storage $ = _getAccessControlStorage();
        if (hasRole(role, account)) {
            $._roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

// src/signature-requests/SignatureReceiverBase.sol

/// @title SignatureReceiverBase contract
/// @author Randamu
/// @notice Abstract contract for handling signature reception and forwarding signature requests.
/// @dev Implements ISignatureReceiver and provides utilities for requesting and receiving signatures.
abstract contract SignatureReceiverBase is ISignatureReceiver {
    /// @notice The contract that manages signature requests.
    ISignatureSender public signatureSender;

    /// @notice Ensures that only the designated signature sender can invoke the function.
    modifier onlySignatureSender() {
        require(msg.sender == address(signatureSender), "Only signatureSender can call");
        _;
    }

    /// @notice Initiates a signature request for a given message under a specified signature scheme.
    /// @dev Calls the `requestSignature` function of the `signatureSender` contract, passing the provided parameters.
    /// @param schemeID The identifier of the signature scheme to be used for signing the message.
    /// @param message The message to be signed, provided as a byte array.
    /// @param condition Additional conditions that must be satisfied for the signature request, provided as a byte array.
    /// @return requestID The unique identifier assigned to the initiated signature request.
    function requestSignature(string calldata schemeID, bytes calldata message, bytes calldata condition)
        internal
        returns (uint256)
    {
        return signatureSender.requestSignature(schemeID, message, condition);
    }

    /// @notice Receives a signature for a previously requested message.
    /// @dev Implements {ISignatureReceiver-receiveSignature}. Ensures only the signature sender can call this function.
    /// @param requestID The unique identifier of the signature request.
    /// @param signature The cryptographic signature of the message, provided as a byte array.
    function receiveSignature(uint256 requestID, bytes calldata signature) external onlySignatureSender {
        onSignatureReceived(requestID, signature);
    }

    /// @notice Handles the reception of a digital signature for a specified request.
    /// @dev This internal function is called when a signature is received for the given `requestID`.
    /// It is intended to be overridden by derived contracts to implement custom behavior upon receipt of a signature.
    /// @param requestID The unique identifier of the signature request associated with the received signature.
    /// @param signature The cryptographic signature of the message, provided as a byte array.
    function onSignatureReceived(uint256 requestID, bytes calldata signature) internal virtual;
}

// lib/openzeppelin-contracts-upgradeable/contracts/access/extensions/AccessControlEnumerableUpgradeable.sol

// OpenZeppelin Contracts (last updated v5.1.0) (access/extensions/AccessControlEnumerable.sol)

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable {
    using EnumerableSet for EnumerableSet.AddressSet;

    /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable
    struct AccessControlEnumerableStorage {
        mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000;

    function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) {
        assembly {
            $.slot := AccessControlEnumerableStorageLocation
        }
    }

    function __AccessControlEnumerable_init() internal onlyInitializing {
    }

    function __AccessControlEnumerable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].length();
    }

    /**
     * @dev Return all accounts that have `role`
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function getRoleMembers(bytes32 role) public view virtual returns (address[] memory) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        return $._roleMembers[role].values();
    }

    /**
     * @dev Overload {AccessControl-_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override returns (bool) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        bool granted = super._grantRole(role, account);
        if (granted) {
            $._roleMembers[role].add(account);
        }
        return granted;
    }

    /**
     * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) {
        AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage();
        bool revoked = super._revokeRole(role, account);
        if (revoked) {
            $._roleMembers[role].remove(account);
        }
        return revoked;
    }
}

// lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol

// OpenZeppelin Contracts (last updated v5.2.0) (proxy/utils/UUPSUpgradeable.sol)

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
    address private immutable __self = address(this);

    /**
     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
     * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
     * during an upgrade.
     */
    string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";

    /**
     * @dev The call is from an unauthorized context.
     */
    error UUPSUnauthorizedCallContext();

    /**
     * @dev The storage `slot` is unsupported as a UUID.
     */
    error UUPSUnsupportedProxiableUUID(bytes32 slot);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        _checkProxy();
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        _checkNotDelegated();
        _;
    }

    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual notDelegated returns (bytes32) {
        return ERC1967Utils.IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data);
    }

    /**
     * @dev Reverts if the execution is not performed via delegatecall or the execution
     * context is not of a proxy with an ERC-1967 compliant implementation pointing to self.
     * See {_onlyProxy}.
     */
    function _checkProxy() internal view virtual {
        if (
            address(this) == __self || // Must be called through delegatecall
            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
        ) {
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Reverts if the execution is performed via delegatecall.
     * See {notDelegated}.
     */
    function _checkNotDelegated() internal view virtual {
        if (address(this) != __self) {
            // Must not be called through delegatecall
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
     *
     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
     * is expected to be the implementation slot in ERC-1967.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
                revert UUPSUnsupportedProxiableUUID(slot);
            }
            ERC1967Utils.upgradeToAndCall(newImplementation, data);
        } catch {
            // The implementation is not UUPS
            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
        }
    }
}

// src/randomness/RandomnessSender.sol

/// @title RandomnessSender contract
/// @author Randamu
/// @notice Handles randomness requests from user's contracts and
/// forwards the randomness to them via a callback to the `receiveRandomness(...)` function.
contract RandomnessSender is
    IRandomnessSender,
    SignatureReceiverBase,
    Initializable,
    UUPSUpgradeable,
    AccessControlEnumerableUpgradeable
{
    /// @notice The identifier for the signature scheme used.
    string public constant SCHEME_ID = "BN254";
    /// @notice Role identifier for the contract administrator.
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    /// @notice Internal nonce used to track randomness requests.
    uint256 public nonce = 0;

    /// @notice Mapping from randomness request ID to request details.
    mapping(uint256 => TypesLib.RandomnessRequest) private callbacks;
    /// @notice Array of all randomness requests.
    TypesLib.RandomnessRequest[] private allRequests;

    /// @notice Emitted when a randomness request is initiated.
    event RandomnessRequested(
        uint256 indexed requestID, uint256 indexed nonce, address indexed requester, uint256 requestedAt
    );
    /// @notice Emitted when a randomness callback is successfully processed.
    event RandomnessCallbackSuccess(uint256 indexed requestID, bytes32 randomness, bytes signature);
    /// @notice Emitted when the signature sender address is updated.
    event SignatureSenderUpdated(address indexed signatureSender);

    /// @notice Thrown when a randomness callback fails.
    error RandomnessCallbackFailed(uint256 requestID);

    /// @notice Ensures that only an account with the ADMIN_ROLE can execute a function.
    modifier onlyAdmin() {
        _checkRole(ADMIN_ROLE);
        _;
    }

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    /// @notice Initializes the contract with a signature sender and owner.
    function initialize(address _signatureSender, address owner) public initializer {
        __UUPSUpgradeable_init();
        __AccessControlEnumerable_init();

        require(_grantRole(ADMIN_ROLE, owner), "Grant role failed");
        require(_grantRole(DEFAULT_ADMIN_ROLE, owner), "Grant role failed");

        require(_signatureSender != address(0), "Cannot set zero address as signature sender");
        signatureSender = ISignatureSender(_signatureSender);
    }

    /// @notice Authorizes contract upgrades.
    function _authorizeUpgrade(address newImplementation) internal override onlyAdmin {}

    /// @notice Requests randomness and returns a request ID.
    function requestRandomness() external returns (uint256 requestID) {
        nonce += 1;

        TypesLib.RandomnessRequest memory r = TypesLib.RandomnessRequest({nonce: nonce, callback: msg.sender});
        bytes memory m = messageFrom(r);
        bytes memory conditions = hex"";

        requestID = signatureSender.requestSignature(SCHEME_ID, m, conditions);

        callbacks[requestID] = r;
        allRequests.push(r);

        emit RandomnessRequested(requestID, nonce, msg.sender, block.timestamp);
    }

    /// @notice Processes a received signature and invokes the callback.
    function onSignatureReceived(uint256 requestID, bytes calldata signature) internal override {
        TypesLib.RandomnessRequest memory r = callbacks[requestID];
        require(r.nonce > 0, "Request with that requestID did not exist");

        bytes32 randomness = keccak256(signature);

        (bool success,) = r.callback.call(
            abi.encodeWithSelector(IRandomnessReceiver.receiveRandomness.selector, requestID, randomness)
        );
        if (!success) {
            revert RandomnessCallbackFailed(requestID);
        } else {
            emit RandomnessCallbackSuccess(requestID, randomness, signature);
        }
    }

    /// @notice Updates the signature sender address.
    function setSignatureSender(address newSignatureSender) external onlyAdmin {
        signatureSender = ISignatureSender(newSignatureSender);
        emit SignatureSenderUpdated(newSignatureSender);
    }

    /// @notice Checks if a request is still in flight.
    function isInFlight(uint256 requestID) external view returns (bool) {
        return signatureSender.isInFlight(requestID);
    }

    /// @notice Generates a message from a randomness request.
    function messageFrom(TypesLib.RandomnessRequest memory r) public pure returns (bytes memory) {
        return abi.encodePacked(keccak256(abi.encode(r.nonce)));
    }

    /// @notice Retrieves a randomness request by ID.
    function getRequest(uint256 requestId) external view returns (TypesLib.RandomnessRequest memory) {
        return callbacks[requestId];
    }

    /// @notice Retrieves all randomness requests.
    function getAllRequests() external view returns (TypesLib.RandomnessRequest[] memory) {
        return allRequests;
    }

    /// @notice Returns the contract version.
    function version() external pure returns (string memory) {
        return "0.0.1";
    }
}

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"uint256","name":"requestID","type":"uint256"}],"name":"RandomnessCallbackFailed","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestID","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"randomness","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"}],"name":"RandomnessCallbackSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":false,"internalType":"uint256","name":"requestedAt","type":"uint256"}],"name":"RandomnessRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signatureSender","type":"address"}],"name":"SignatureSenderUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SCHEME_ID","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllRequests","outputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"callback","type":"address"}],"internalType":"struct TypesLib.RandomnessRequest[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"getRequest","outputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"callback","type":"address"}],"internalType":"struct TypesLib.RandomnessRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signatureSender","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestID","type":"uint256"}],"name":"isInFlight","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"callback","type":"address"}],"internalType":"struct TypesLib.RandomnessRequest","name":"r","type":"tuple"}],"name":"messageFrom","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestID","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"receiveSignature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestRandomness","outputs":[{"internalType":"uint256","name":"requestID","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSignatureSender","type":"address"}],"name":"setSignatureSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signatureSender","outputs":[{"internalType":"contract ISignatureSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}]

60a0604052306080525f600155348015610017575f5ffd5b50610020610025565b6100d7565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100755760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d45780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516125566100fd5f395f818161123701528181611260015261149d01526125565ff3fe608060405260043610610199575f3560e01c806391d14854116100dc578063c8db658211610087578063d547741f11610062578063d547741f146105eb578063f8413b071461060a578063f8fa0d661461061e578063fb1a002a1461063d575f5ffd5b8063c8db65821461058e578063ca15c873146105ad578063cd802c91146105cc575f5ffd5b8063ad3cb1cc116100b7578063ad3cb1cc146104b8578063affed0e014610500578063c58343ef14610515575f5ffd5b806391d1485414610409578063a217fddf14610479578063a3246ad31461048c575f5ffd5b806352d1902d11610147578063775b839c11610122578063775b839c146103335780637d468106146103525780638a1f165a146103a25780639010d07c146103ea575f5ffd5b806352d1902d1461029e57806354fd4d50146102b257806375b238fc14610300575f5ffd5b806336568abe1161017757806336568abe1461024d578063485cc9551461026c5780634f1ef2861461028b575f5ffd5b806301ffc9a71461019d578063248a9ca3146101d15780632f2ff15d1461022c575b5f5ffd5b3480156101a8575f5ffd5b506101bc6101b7366004611f2b565b61065e565b60405190151581526020015b60405180910390f35b3480156101dc575f5ffd5b5061021e6101eb366004611f6a565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b6040519081526020016101c8565b348015610237575f5ffd5b5061024b610246366004611fa9565b6106b9565b005b348015610258575f5ffd5b5061024b610267366004611fa9565b610702565b348015610277575f5ffd5b5061024b610286366004611fd3565b610760565b61024b610299366004612077565b610acd565b3480156102a9575f5ffd5b5061021e610aec565b3480156102bd575f5ffd5b5060408051808201909152600581527f302e302e3100000000000000000000000000000000000000000000000000000060208201525b6040516101c89190612186565b34801561030b575f5ffd5b5061021e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561033e575f5ffd5b506102f361034d366004612198565b610b1a565b34801561035d575f5ffd5b505f5461037d9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c8565b3480156103ad575f5ffd5b506102f36040518060400160405280600581526020017f424e32353400000000000000000000000000000000000000000000000000000081525081565b3480156103f5575f5ffd5b5061037d6104043660046121ec565b610b83565b348015610414575f5ffd5b506101bc610423366004611fa9565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b348015610484575f5ffd5b5061021e5f81565b348015610497575f5ffd5b506104ab6104a6366004611f6a565b610bc3565b6040516101c8919061220c565b3480156104c3575f5ffd5b506102f36040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b34801561050b575f5ffd5b5061021e60015481565b348015610520575f5ffd5b5061058161052f366004611f6a565b604080518082019091525f8082526020820152505f908152600260209081526040918290208251808401909352805483526001015473ffffffffffffffffffffffffffffffffffffffff169082015290565b6040516101c89190612264565b348015610599575f5ffd5b5061024b6105a8366004612291565b610c06565b3480156105b8575f5ffd5b5061021e6105c7366004611f6a565b610c91565b3480156105d7575f5ffd5b506101bc6105e6366004611f6a565b610cc8565b3480156105f6575f5ffd5b5061024b610605366004611fa9565b610d59565b348015610615575f5ffd5b5061021e610d9c565b348015610629575f5ffd5b5061024b610638366004612308565b610fbc565b348015610648575f5ffd5b50610651611051565b6040516101c89190612321565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806106b357506106b3826110d1565b92915050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546106f281611167565b6106fc8383611174565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610751576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61075b82826111c9565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156107aa5750825b90505f8267ffffffffffffffff1660011480156107c65750303b155b9050811580156107d4575080155b1561080b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561086c5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610874611215565b61087c611215565b6108a67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177587611174565b610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4772616e7420726f6c65206661696c656400000000000000000000000000000060448201526064015b60405180910390fd5b61091b5f87611174565b610981576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4772616e7420726f6c65206661696c65640000000000000000000000000000006044820152606401610908565b73ffffffffffffffffffffffffffffffffffffffff8716610a24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f43616e6e6f7420736574207a65726f2061646472657373206173207369676e6160448201527f747572652073656e6465720000000000000000000000000000000000000000006064820152608401610908565b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161790558315610ac45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b610ad561121f565b610ade82611323565b610ae8828261134c565b5050565b5f610af5611485565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b8051604051606091610b329160200190815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830152016040516020818303038152906040529050919050565b5f8281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610bbb90846114f4565b949350505050565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320006020819052604090912060609190610bff906114ff565b9392505050565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f6e6c79207369676e617475726553656e6465722063616e2063616c6c0000006044820152606401610908565b61075b83838361150b565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610bff9061177c565b5f80546040517fcd802c910000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063cd802c9190602401602060405180830381865afa158015610d35573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b39190612383565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610d9281611167565b6106fc83836111c9565b5f6001805f828254610dae91906123cf565b90915550506040805180820190915260015481523360208201525f610dd282610b1a565b60408051602080820183525f8083525483518085018552600581527f424e3235340000000000000000000000000000000000000000000000000000009281019290925292517f95b8d073000000000000000000000000000000000000000000000000000000008152939450909273ffffffffffffffffffffffffffffffffffffffff909216916395b8d07391610e6e91869086906004016123e2565b6020604051808303815f875af1158015610e8a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610eae9190612424565b5f818152600260208181526040808420885181558883018051600192830180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff9384161790915560038054808601825598528b517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b989097029788019690965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c9096018054909516951694909417909255915490514281529296503392909187917feee7195b6cee0fa7044c3af0b86fe2febb1d2703d71191f44052ba0d60ffda64910160405180910390a450505090565b610fe57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611167565b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f229f6c3b095d683755a99ab458956747a8b7066c3dd42927d850631c34c238f191a250565b60606003805480602002602001604051908101604052809291908181526020015f905b828210156110c8575f84815260209081902060408051808201909152600285029091018054825260019081015473ffffffffffffffffffffffffffffffffffffffff16828401529083529092019101611074565b50505050905090565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806106b357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b3565b6111718133611785565b50565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816111a1858561182b565b90508015610bbb575f8581526020839052604090206111c09085611949565b50949350505050565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816111f6858561196a565b90508015610bbb575f8581526020839052604090206111c09085611a46565b61121d611a67565b565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614806112ec57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166112d37f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561121d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111717fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611167565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113d1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526113ce91810190612424565b60015b61141f576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610908565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461147b576040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101829052602401610908565b61075b8383611ace565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461121d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610bff8383611b30565b60605f610bff83611b56565b5f838152600260209081526040918290208251808401909352805480845260019091015473ffffffffffffffffffffffffffffffffffffffff16918301919091526115d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f526571756573742077697468207468617420726571756573744944206469642060448201527f6e6f7420657869737400000000000000000000000000000000000000000000006064820152608401610908565b5f83836040516115e992919061243b565b604051809103902090505f826020015173ffffffffffffffffffffffffffffffffffffffff1663431ac65760e01b8784604051602401611633929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516116bc919061244a565b5f604051808303815f865af19150503d805f81146116f5576040519150601f19603f3d011682016040523d82523d5f602084013e6116fa565b606091505b5050905080611738576040517f8f67472d00000000000000000000000000000000000000000000000000000000815260048101879052602401610908565b857fb74b3204a538cd8021662d42e794681ddc339924ef675b8fd11e9eaf6aa19eb583878760405161176c93929190612460565b60405180910390a2505050505050565b5f6106b3825490565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610ae8576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610908565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff16611940575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556118dc3390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106b3565b5f9150506106b3565b5f610bff8373ffffffffffffffffffffffffffffffffffffffff8416611baf565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff1615611940575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106b3565b5f610bff8373ffffffffffffffffffffffffffffffffffffffff8416611bfb565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661121d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ad782611cd5565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115611b285761075b8282611da3565b610ae8611e22565b5f825f018281548110611b4557611b456124b3565b905f5260205f200154905092915050565b6060815f01805480602002602001604051908101604052809291908181526020018280548015611ba357602002820191905f5260205f20905b815481526020019060010190808311611b8f575b50505050509050919050565b5f818152600183016020526040812054611bf457508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556106b3565b505f6106b3565b5f8181526001830160205260408120548015611940575f611c1d6001836124e0565b85549091505f90611c30906001906124e0565b9050808214611c8f575f865f018281548110611c4e57611c4e6124b3565b905f5260205f200154905080875f018481548110611c6e57611c6e6124b3565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611ca057611ca06124f3565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506106b3565b8073ffffffffffffffffffffffffffffffffffffffff163b5f03611d3d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610908565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f5f8473ffffffffffffffffffffffffffffffffffffffff1684604051611dcc919061244a565b5f60405180830381855af49150503d805f8114611e04576040519150601f19603f3d011682016040523d82523d5f602084013e611e09565b606091505b5091509150611e19858383611e5a565b95945050505050565b341561121d576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082611e6f57611e6a82611ee9565b610bff565b8151158015611e93575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611ee2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610908565b5092915050565b805115611ef95780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60208284031215611f3b575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610bff575f5ffd5b5f60208284031215611f7a575f5ffd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611fa4575f5ffd5b919050565b5f5f60408385031215611fba575f5ffd5b82359150611fca60208401611f81565b90509250929050565b5f5f60408385031215611fe4575f5ffd5b611fed83611f81565b9150611fca60208401611f81565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561206f5761206f611ffb565b604052919050565b5f5f60408385031215612088575f5ffd5b61209183611f81565b9150602083013567ffffffffffffffff8111156120ac575f5ffd5b8301601f810185136120bc575f5ffd5b803567ffffffffffffffff8111156120d6576120d6611ffb565b61210760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612028565b81815286602083850101111561211b575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610bff602083018461213a565b5f60408284031280156121a9575f5ffd5b506040805190810167ffffffffffffffff811182821017156121cd576121cd611ffb565b604052823581526121e060208401611f81565b60208201529392505050565b5f5f604083850312156121fd575f5ffd5b50508035926020909101359150565b602080825282518282018190525f918401906040840190835b8181101561225957835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612225565b509095945050505050565b8151815260208083015173ffffffffffffffffffffffffffffffffffffffff1690820152604081016106b3565b5f5f5f604084860312156122a3575f5ffd5b83359250602084013567ffffffffffffffff8111156122c0575f5ffd5b8401601f810186136122d0575f5ffd5b803567ffffffffffffffff8111156122e6575f5ffd5b8660208284010111156122f7575f5ffd5b939660209190910195509293505050565b5f60208284031215612318575f5ffd5b610bff82611f81565b602080825282518282018190525f918401906040840190835b818110156122595761236d8385518051825260209081015173ffffffffffffffffffffffffffffffffffffffff16910152565b602093909301926040929092019160010161233a565b5f60208284031215612393575f5ffd5b81518015158114610bff575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b3576106b36123a2565b606081525f6123f4606083018661213a565b8281036020840152612406818661213a565b9050828103604084015261241a818561213a565b9695505050505050565b5f60208284031215612434575f5ffd5b5051919050565b818382375f9101908152919050565b5f82518060208501845e5f920191825250919050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b818103818111156106b3576106b36123a2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea2646970667358221220fb9ee1bf715387e4c9ff6019b0dadf149d4fbf8d9d881aa9a158e8bab001713e64736f6c634300081c0033

Deployed Bytecode

0x608060405260043610610199575f3560e01c806391d14854116100dc578063c8db658211610087578063d547741f11610062578063d547741f146105eb578063f8413b071461060a578063f8fa0d661461061e578063fb1a002a1461063d575f5ffd5b8063c8db65821461058e578063ca15c873146105ad578063cd802c91146105cc575f5ffd5b8063ad3cb1cc116100b7578063ad3cb1cc146104b8578063affed0e014610500578063c58343ef14610515575f5ffd5b806391d1485414610409578063a217fddf14610479578063a3246ad31461048c575f5ffd5b806352d1902d11610147578063775b839c11610122578063775b839c146103335780637d468106146103525780638a1f165a146103a25780639010d07c146103ea575f5ffd5b806352d1902d1461029e57806354fd4d50146102b257806375b238fc14610300575f5ffd5b806336568abe1161017757806336568abe1461024d578063485cc9551461026c5780634f1ef2861461028b575f5ffd5b806301ffc9a71461019d578063248a9ca3146101d15780632f2ff15d1461022c575b5f5ffd5b3480156101a8575f5ffd5b506101bc6101b7366004611f2b565b61065e565b60405190151581526020015b60405180910390f35b3480156101dc575f5ffd5b5061021e6101eb366004611f6a565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b6040519081526020016101c8565b348015610237575f5ffd5b5061024b610246366004611fa9565b6106b9565b005b348015610258575f5ffd5b5061024b610267366004611fa9565b610702565b348015610277575f5ffd5b5061024b610286366004611fd3565b610760565b61024b610299366004612077565b610acd565b3480156102a9575f5ffd5b5061021e610aec565b3480156102bd575f5ffd5b5060408051808201909152600581527f302e302e3100000000000000000000000000000000000000000000000000000060208201525b6040516101c89190612186565b34801561030b575f5ffd5b5061021e7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561033e575f5ffd5b506102f361034d366004612198565b610b1a565b34801561035d575f5ffd5b505f5461037d9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c8565b3480156103ad575f5ffd5b506102f36040518060400160405280600581526020017f424e32353400000000000000000000000000000000000000000000000000000081525081565b3480156103f5575f5ffd5b5061037d6104043660046121ec565b610b83565b348015610414575f5ffd5b506101bc610423366004611fa9565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b348015610484575f5ffd5b5061021e5f81565b348015610497575f5ffd5b506104ab6104a6366004611f6a565b610bc3565b6040516101c8919061220c565b3480156104c3575f5ffd5b506102f36040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b34801561050b575f5ffd5b5061021e60015481565b348015610520575f5ffd5b5061058161052f366004611f6a565b604080518082019091525f8082526020820152505f908152600260209081526040918290208251808401909352805483526001015473ffffffffffffffffffffffffffffffffffffffff169082015290565b6040516101c89190612264565b348015610599575f5ffd5b5061024b6105a8366004612291565b610c06565b3480156105b8575f5ffd5b5061021e6105c7366004611f6a565b610c91565b3480156105d7575f5ffd5b506101bc6105e6366004611f6a565b610cc8565b3480156105f6575f5ffd5b5061024b610605366004611fa9565b610d59565b348015610615575f5ffd5b5061021e610d9c565b348015610629575f5ffd5b5061024b610638366004612308565b610fbc565b348015610648575f5ffd5b50610651611051565b6040516101c89190612321565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806106b357506106b3826110d1565b92915050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260409020600101546106f281611167565b6106fc8383611174565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610751576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61075b82826111c9565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156107aa5750825b90505f8267ffffffffffffffff1660011480156107c65750303b155b9050811580156107d4575080155b1561080b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561086c5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b610874611215565b61087c611215565b6108a67fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177587611174565b610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4772616e7420726f6c65206661696c656400000000000000000000000000000060448201526064015b60405180910390fd5b61091b5f87611174565b610981576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f4772616e7420726f6c65206661696c65640000000000000000000000000000006044820152606401610908565b73ffffffffffffffffffffffffffffffffffffffff8716610a24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f43616e6e6f7420736574207a65726f2061646472657373206173207369676e6160448201527f747572652073656e6465720000000000000000000000000000000000000000006064820152608401610908565b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161790558315610ac45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b610ad561121f565b610ade82611323565b610ae8828261134c565b5050565b5f610af5611485565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b8051604051606091610b329160200190815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012090830152016040516020818303038152906040529050919050565b5f8281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610bbb90846114f4565b949350505050565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320006020819052604090912060609190610bff906114ff565b9392505050565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4f6e6c79207369676e617475726553656e6465722063616e2063616c6c0000006044820152606401610908565b61075b83838361150b565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610bff9061177c565b5f80546040517fcd802c910000000000000000000000000000000000000000000000000000000081526004810184905273ffffffffffffffffffffffffffffffffffffffff9091169063cd802c9190602401602060405180830381865afa158015610d35573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b39190612383565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020526040902060010154610d9281611167565b6106fc83836111c9565b5f6001805f828254610dae91906123cf565b90915550506040805180820190915260015481523360208201525f610dd282610b1a565b60408051602080820183525f8083525483518085018552600581527f424e3235340000000000000000000000000000000000000000000000000000009281019290925292517f95b8d073000000000000000000000000000000000000000000000000000000008152939450909273ffffffffffffffffffffffffffffffffffffffff909216916395b8d07391610e6e91869086906004016123e2565b6020604051808303815f875af1158015610e8a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610eae9190612424565b5f818152600260208181526040808420885181558883018051600192830180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff9384161790915560038054808601825598528b517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b989097029788019690965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c9096018054909516951694909417909255915490514281529296503392909187917feee7195b6cee0fa7044c3af0b86fe2febb1d2703d71191f44052ba0d60ffda64910160405180910390a450505090565b610fe57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611167565b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f229f6c3b095d683755a99ab458956747a8b7066c3dd42927d850631c34c238f191a250565b60606003805480602002602001604051908101604052809291908181526020015f905b828210156110c8575f84815260209081902060408051808201909152600285029091018054825260019081015473ffffffffffffffffffffffffffffffffffffffff16828401529083529092019101611074565b50505050905090565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806106b357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b3565b6111718133611785565b50565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816111a1858561182b565b90508015610bbb575f8581526020839052604090206111c09085611949565b50949350505050565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816111f6858561196a565b90508015610bbb575f8581526020839052604090206111c09085611a46565b61121d611a67565b565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007eadb9d0777fe2f8061c652135eb4db0aa51a2811614806112ec57507f0000000000000000000000007eadb9d0777fe2f8061c652135eb4db0aa51a28173ffffffffffffffffffffffffffffffffffffffff166112d37f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561121d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111717fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775611167565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113d1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526113ce91810190612424565b60015b61141f576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610908565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc811461147b576040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101829052602401610908565b61075b8383611ace565b3073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007eadb9d0777fe2f8061c652135eb4db0aa51a281161461121d576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610bff8383611b30565b60605f610bff83611b56565b5f838152600260209081526040918290208251808401909352805480845260019091015473ffffffffffffffffffffffffffffffffffffffff16918301919091526115d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f526571756573742077697468207468617420726571756573744944206469642060448201527f6e6f7420657869737400000000000000000000000000000000000000000000006064820152608401610908565b5f83836040516115e992919061243b565b604051809103902090505f826020015173ffffffffffffffffffffffffffffffffffffffff1663431ac65760e01b8784604051602401611633929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516116bc919061244a565b5f604051808303815f865af19150503d805f81146116f5576040519150601f19603f3d011682016040523d82523d5f602084013e6116fa565b606091505b5050905080611738576040517f8f67472d00000000000000000000000000000000000000000000000000000000815260048101879052602401610908565b857fb74b3204a538cd8021662d42e794681ddc339924ef675b8fd11e9eaf6aa19eb583878760405161176c93929190612460565b60405180910390a2505050505050565b5f6106b3825490565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610ae8576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610908565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff16611940575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556118dc3390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106b3565b5f9150506106b3565b5f610bff8373ffffffffffffffffffffffffffffffffffffffff8416611baf565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff1615611940575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106b3565b5f610bff8373ffffffffffffffffffffffffffffffffffffffff8416611bfb565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661121d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ad782611cd5565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115611b285761075b8282611da3565b610ae8611e22565b5f825f018281548110611b4557611b456124b3565b905f5260205f200154905092915050565b6060815f01805480602002602001604051908101604052809291908181526020018280548015611ba357602002820191905f5260205f20905b815481526020019060010190808311611b8f575b50505050509050919050565b5f818152600183016020526040812054611bf457508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556106b3565b505f6106b3565b5f8181526001830160205260408120548015611940575f611c1d6001836124e0565b85549091505f90611c30906001906124e0565b9050808214611c8f575f865f018281548110611c4e57611c4e6124b3565b905f5260205f200154905080875f018481548110611c6e57611c6e6124b3565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611ca057611ca06124f3565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506106b3565b8073ffffffffffffffffffffffffffffffffffffffff163b5f03611d3d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610908565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f5f8473ffffffffffffffffffffffffffffffffffffffff1684604051611dcc919061244a565b5f60405180830381855af49150503d805f8114611e04576040519150601f19603f3d011682016040523d82523d5f602084013e611e09565b606091505b5091509150611e19858383611e5a565b95945050505050565b341561121d576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082611e6f57611e6a82611ee9565b610bff565b8151158015611e93575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611ee2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610908565b5092915050565b805115611ef95780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60208284031215611f3b575f5ffd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610bff575f5ffd5b5f60208284031215611f7a575f5ffd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611fa4575f5ffd5b919050565b5f5f60408385031215611fba575f5ffd5b82359150611fca60208401611f81565b90509250929050565b5f5f60408385031215611fe4575f5ffd5b611fed83611f81565b9150611fca60208401611f81565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561206f5761206f611ffb565b604052919050565b5f5f60408385031215612088575f5ffd5b61209183611f81565b9150602083013567ffffffffffffffff8111156120ac575f5ffd5b8301601f810185136120bc575f5ffd5b803567ffffffffffffffff8111156120d6576120d6611ffb565b61210760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612028565b81815286602083850101111561211b575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610bff602083018461213a565b5f60408284031280156121a9575f5ffd5b506040805190810167ffffffffffffffff811182821017156121cd576121cd611ffb565b604052823581526121e060208401611f81565b60208201529392505050565b5f5f604083850312156121fd575f5ffd5b50508035926020909101359150565b602080825282518282018190525f918401906040840190835b8181101561225957835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612225565b509095945050505050565b8151815260208083015173ffffffffffffffffffffffffffffffffffffffff1690820152604081016106b3565b5f5f5f604084860312156122a3575f5ffd5b83359250602084013567ffffffffffffffff8111156122c0575f5ffd5b8401601f810186136122d0575f5ffd5b803567ffffffffffffffff8111156122e6575f5ffd5b8660208284010111156122f7575f5ffd5b939660209190910195509293505050565b5f60208284031215612318575f5ffd5b610bff82611f81565b602080825282518282018190525f918401906040840190835b818110156122595761236d8385518051825260209081015173ffffffffffffffffffffffffffffffffffffffff16910152565b602093909301926040929092019160010161233a565b5f60208284031215612393575f5ffd5b81518015158114610bff575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b3576106b36123a2565b606081525f6123f4606083018661213a565b8281036020840152612406818661213a565b9050828103604084015261241a818561213a565b9695505050505050565b5f60208284031215612434575f5ffd5b5051919050565b818382375f9101908152919050565b5f82518060208501845e5f920191825250919050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b818103818111156106b3576106b36123a2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea2646970667358221220fb9ee1bf715387e4c9ff6019b0dadf149d4fbf8d9d881aa9a158e8bab001713e64736f6c634300081c0033

Deployed Bytecode Sourcemap

130674:4976:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;120695:214;;;;;;;;;;-1:-1:-1;120695:214:0;;;;;:::i;:::-;;:::i;:::-;;;516:14:1;;509:22;491:41;;479:2;464:18;120695:214:0;;;;;;;;112864:194;;;;;;;;;;-1:-1:-1;112864:194:0;;;;;:::i;:::-;112929:7;113026:14;;;110968:28;113026:14;;;;;:24;;;;112864:194;;;;920:25:1;;;908:2;893:18;112864:194:0;774:177:1;113368:138:0;;;;;;;;;;-1:-1:-1;113368:138:0;;;;;:::i;:::-;;:::i;:::-;;114505:251;;;;;;;;;;-1:-1:-1;114505:251:0;;;;;:::i;:::-;;:::i;132457:478::-;;;;;;;;;;-1:-1:-1;132457:478:0;;;;;:::i;:::-;;:::i;127911:217::-;;;;;;:::i;:::-;;:::i;127444:136::-;;;;;;;;;;;;;:::i;135557:90::-;;;;;;;;;;-1:-1:-1;135625:14:0;;;;;;;;;;;;;;;;;135557:90;;;;;;;:::i;131022:60::-;;;;;;;;;;;;131059:23;131022:60;;134946:167;;;;;;;;;;-1:-1:-1;134946:167:0;;;;;:::i;:::-;;:::i;116952:39::-;;;;;;;;;;-1:-1:-1;116952:39:0;;;;;;;;;;;4788:42:1;4776:55;;;4758:74;;4746:2;4731:18;116952:39:0;4587:251:1;130908:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121508:236;;;;;;;;;;-1:-1:-1;121508:236:0;;;;;:::i;:::-;;:::i;111808:210::-;;;;;;;;;;-1:-1:-1;111808:210:0;;;;;:::i;:::-;111885:4;111979:14;;;110968:28;111979:14;;;;;;;;:31;;;;;;;;;;;;;;;;111808:210;110354:49;;;;;;;;;;-1:-1:-1;110354:49:0;110399:4;110354:49;;122696:230;;;;;;;;;;-1:-1:-1;122696:230:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;125509:58::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;131158:24;;;;;;;;;;;;;;;;135176:143;;;;;;;;;;-1:-1:-1;135176:143:0;;;;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;;135291:20:0;;;;:9;:20;;;;;;;;;135284:27;;;;;;;;;;;;;;;;;;;;;;135176:143;;;;;;;;:::i;118473:160::-;;;;;;;;;;-1:-1:-1;118473:160:0;;;;;:::i;:::-;;:::i;121918:225::-;;;;;;;;;;-1:-1:-1;121918:225:0;;;;;:::i;:::-;;:::i;134743:131::-;;;;;;;;;;-1:-1:-1;134743:131:0;;;;;:::i;:::-;;:::i;113799:140::-;;;;;;;;;;-1:-1:-1;113799:140:0;;;;;:::i;:::-;;:::i;133145:528::-;;;;;;;;;;;;;:::i;134472:206::-;;;;;;;;;;-1:-1:-1;134472:206:0;;;;;:::i;:::-;;:::i;135379:123::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;120695:214::-;120780:4;120804:57;;;120819:42;120804:57;;:97;;;120865:36;120889:11;120865:23;:36::i;:::-;120797:104;120695:214;-1:-1:-1;;120695:214:0:o;113368:138::-;112929:7;113026:14;;;110968:28;113026:14;;;;;:24;;;111248:16;111259:4;111248:10;:16::i;:::-;113473:25:::1;113484:4;113490:7;113473:10;:25::i;:::-;;113368:138:::0;;;:::o;114505:251::-;114599:34;;;69065:10;114599:34;114595:104;;114657:30;;;;;;;;;;;;;;114595:104;114711:37;114723:4;114729:18;114711:11;:37::i;:::-;;114505:251;;:::o;132457:478::-;34177:21;29493:15;;;;;;;29492:16;;29540:14;;29346:30;29925:16;;:34;;;;;29945:14;29925:34;29905:54;;29970:17;29990:11;:16;;30005:1;29990:16;:50;;;;-1:-1:-1;30018:4:0;30010:25;:30;29990:50;29970:70;;30058:12;30057:13;:30;;;;;30075:12;30074:13;30057:30;30053:93;;;30111:23;;;;;;;;;;;;;;30053:93;30156:18;;;;30173:1;30156:18;;;30185:69;;;;30220:22;;;;;;;;30185:69;132548:24:::1;:22;:24::i;:::-;132583:32;:30;:32::i;:::-;132636:29;131059:23;132659:5;132636:10;:29::i;:::-;132628:59;;;::::0;::::1;::::0;;8809:2:1;132628:59:0::1;::::0;::::1;8791:21:1::0;8848:2;8828:18;;;8821:30;8887:19;8867:18;;;8860:47;8924:18;;132628:59:0::1;;;;;;;;;132706:37;110399:4;132737:5:::0;132706:10:::1;:37::i;:::-;132698:67;;;::::0;::::1;::::0;;8809:2:1;132698:67:0::1;::::0;::::1;8791:21:1::0;8848:2;8828:18;;;8821:30;8887:19;8867:18;;;8860:47;8924:18;;132698:67:0::1;8607:341:1::0;132698:67:0::1;132786:30;::::0;::::1;132778:86;;;::::0;::::1;::::0;;9155:2:1;132778:86:0::1;::::0;::::1;9137:21:1::0;9194:2;9174:18;;;9167:30;9233:34;9213:18;;;9206:62;9304:13;9284:18;;;9277:41;9335:19;;132778:86:0::1;8953:407:1::0;132778:86:0::1;132875:15;:52:::0;;;::::1;;::::0;::::1;;::::0;;30276:104;;;;30311:23;;;;;;30354:14;;-1:-1:-1;9518:50:1;;30354:14:0;;9506:2:1;9491:18;30354:14:0;;;;;;;30276:104;29278:1109;;;;;132457:478;;:::o;127911:217::-;126365:13;:11;:13::i;:::-;128027:36:::1;128045:17;128027;:36::i;:::-;128074:46;128096:17;128115:4;128074:21;:46::i;:::-;127911:217:::0;;:::o;127444:136::-;127513:7;126645:20;:18;:20::i;:::-;-1:-1:-1;102666:66:0::1;127444:136:::0;:::o;134946:167::-;135095:7;;135084:19;;135025:12;;135084:19;;;;920:25:1;;;908:2;893:18;;774:177;135084:19:0;;;;;;;;;;;;;;135074:30;;135084:19;135074:30;;;;135057:48;;;9708:19:1;9743:12;135057:48:0;;;;;;;;;;;;135050:55;;134946:167;;;:::o;121508:236::-;121589:7;121706:20;;;120391:38;121706:20;;;;;;;:30;;121730:5;121706:23;:30::i;:::-;121699:37;121508:236;-1:-1:-1;;;;121508:236:0:o;122696:230::-;122792:40;122889:20;;;120391:38;122889:20;;;;;;;;122763:16;;120391:38;122889:29;;:27;:29::i;:::-;122882:36;122696:230;-1:-1:-1;;;122696:230:0:o;118473:160::-;117164:15;;;;117142:10;:38;117134:80;;;;;;;9968:2:1;117134:80:0;;;9950:21:1;10007:2;9987:18;;;9980:30;10046:31;10026:18;;;10019:59;10095:18;;117134:80:0;9766:353:1;117134:80:0;118584:41:::1;118604:9;118615;;118584:19;:41::i;121918:225::-:0;121989:7;122106:20;;;120391:38;122106:20;;;;;;;:29;;:27;:29::i;134743:131::-;134805:4;134829:15;;:37;;;;;;;;920:25:1;;;134829:15:0;;;;;:26;;893:18:1;;134829:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;113799:140::-;112929:7;113026:14;;;110968:28;113026:14;;;;;:24;;;111248:16;111259:4;111248:10;:16::i;:::-;113905:26:::1;113917:4;113923:7;113905:11;:26::i;133145:528::-:0;133192:17;133231:1;133222:5;;:10;;;;;;;:::i;:::-;;;;-1:-1:-1;;133283:64:0;;;;;;;;;133318:5;;133283:64;;133335:10;133283:64;;;;133245:35;133375:14;133283:64;133375:11;:14::i;:::-;133400:31;;;;;;;;;:23;:31;;;133456:15;133489:9;;;;;;;;;;;;;;;;;;133456:58;;;;;133358:31;;-1:-1:-1;133400:31:0;;133456:15;;;;;:32;;:58;;133358:31;;133400;;133456:58;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;133527:20;;;;:9;:20;;;;;;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;133562:11;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;133630:5;;133599:66;;133649:15;920:25:1;;133527:20:0;;-1:-1:-1;133637:10:0;;133630:5;;133527:20;;133599:66;;893:18:1;133599:66:0;;;;;;;133211:462;;;133145:528;:::o;134472:206::-;132213:22;131059:23;132213:10;:22::i;:::-;134558:15:::1;:54:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;134628:42:::1;::::0;134558:54;;134628:42:::1;::::0;::::1;134472:206:::0;:::o;135379:123::-;135428:35;135483:11;135476:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;135379:123;:::o;111512:204::-;111597:4;111621:47;;;111636:32;111621:47;;:87;;-1:-1:-1;94120:25:0;94105:40;;;;111672:36;94005:148;112233:105;112300:30;112311:4;69065:10;112300;:30::i;:::-;112233:105;:::o;123033:355::-;123119:4;120391:38;123119:4;123241:31;123258:4;123264:7;123241:16;:31::i;:::-;123226:46;;123287:7;123283:73;;;123311:14;:20;;;;;;;;;;:33;;123336:7;123311:24;:33::i;:::-;;123373:7;123033:355;-1:-1:-1;;;;123033:355:0:o;123496:360::-;123583:4;120391:38;123583:4;123705:32;123723:4;123729:7;123705:17;:32::i;:::-;123690:47;;123752:7;123748:76;;;123776:14;:20;;;;;;;;;;:36;;123804:7;123776:27;:36::i;126693:68::-;32184:20;:18;:20::i;:::-;126693:68::o;128363:319::-;128445:4;128437:23;128454:6;128437:23;;;:121;;;128552:6;128516:42;;:32;102666:66;103400:53;;;;103321:140;128516:32;:42;;;;128437:121;128419:256;;;128634:29;;;;;;;;;;;;;;132990:84;132213:22;131059:23;132213:10;:22::i;129857:548::-;129975:17;129957:50;;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;129957:52:0;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;129953:445;;130326:60;;;;;4788:42:1;4776:55;;130326:60:0;;;4758:74:1;4731:18;;130326:60:0;4587:251:1;129953:445:0;102666:66;130052:40;;130048:122;;130120:34;;;;;;;;920:25:1;;;893:18;;130120:34:0;774:177:1;130048:122:0;130184:54;130214:17;130233:4;130184:29;:54::i;128805:218::-;128880:4;128872:23;128889:6;128872:23;;128868:148;;128975:29;;;;;;;;;;;;;;21618:158;21692:7;21743:22;21747:3;21759:5;21743:3;:22::i;22326:282::-;22389:16;22418:22;22443:19;22451:3;22443:7;:19::i;133755:654::-;133858:35;133896:20;;;:9;:20;;;;;;;;;133858:58;;;;;;;;;;;;;;;;;;;;;;;;;;;133927:65;;;;;;;11852:2:1;133927:65:0;;;11834:21:1;11891:2;11871:18;;;11864:30;11930:34;11910:18;;;11903:62;12001:11;11981:18;;;11974:39;12030:19;;133927:65:0;11650:405:1;133927:65:0;134005:18;134036:9;;134026:20;;;;;;;:::i;:::-;;;;;;;;134005:41;;134060:12;134077:1;:10;;;:15;;134130:46;;;134178:9;134189:10;134107:93;;;;;;;;12510:25:1;;;12566:2;12551:18;;12544:34;12498:2;12483:18;;12336:248;134107:93:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;134077:134;;;;134107:93;134077:134;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;134059:152;;;134227:7;134222:180;;134258:35;;;;;;;;920:25:1;;;893:18;;134258:35:0;774:177:1;134222:180:0;134357:9;134331:59;134368:10;134380:9;;134331:59;;;;;;;;:::i;:::-;;;;;;;;133847:562;;;133755:654;;;:::o;21147:117::-;21210:7;21237:19;21245:3;16475:18;;16392:109;112474:201;111885:4;111979:14;;;110968:28;111979:14;;;;;;;;:31;;;;;;;;;;;;;112558:110;;112609:47;;;;;13622:42:1;13610:55;;112609:47:0;;;13592:74:1;13682:18;;;13675:34;;;13565:18;;112609:47:0;13418:297:1;115454:396:0;115531:4;111979:14;;;110968:28;111979:14;;;;;;;;:31;;;;;;;;;;;;;115618:225;;115662:8;:14;;;;;;;;;;;:31;;;;;;;;;;:38;;;;115696:4;115662:38;;;115747:12;69065:10;;68985:98;115747:12;115720:40;;115738:7;115720:40;;115732:4;115720:40;;;;;;;;;;115782:4;115775:11;;;;;115618:225;115826:5;115819:12;;;;;20322:152;20392:4;20416:50;20421:3;20441:23;;;20416:4;:50::i;116094:397::-;116172:4;111979:14;;;110968:28;111979:14;;;;;;;;:31;;;;;;;;;;;;;116259:225;;;116336:5;116302:14;;;;;;;;;;;:31;;;;;;;;;;;:39;;;;;;116361:40;69065:10;;116302:14;;116361:40;;116336:5;116361:40;116423:4;116416:11;;;;;20650:158;20723:4;20747:53;20755:3;20775:23;;;20747:7;:53::i;32344:145::-;34177:21;33858:40;;;;;;32407:75;;32453:17;;;;;;;;;;;;;;104165:353;104257:37;104276:17;104257:18;:37::i;:::-;104310:36;;;;;;;;;;;104363:11;;:15;104359:152;;104395:53;104424:17;104443:4;104395:28;:53::i;104359:152::-;104481:18;:16;:18::i;16855:120::-;16922:7;16949:3;:11;;16961:5;16949:18;;;;;;;;:::i;:::-;;;;;;;;;16942:25;;16855:120;;;;:::o;17525:111::-;17581:16;17617:3;:11;;17610:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17525:111;;;:::o;14097:416::-;14160:4;16272:21;;;:14;;;:21;;;;;;14177:329;;-1:-1:-1;14220:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;14405:18;;14381:21;;;:14;;;:21;;;;;;:42;;;;14438:11;;14177:329;-1:-1:-1;14489:5:0;14482:12;;14689:1400;14755:4;14886:21;;;:14;;;:21;;;;;;14924:13;;14920:1162;;15297:18;15318:12;15329:1;15318:8;:12;:::i;:::-;15365:18;;15297:33;;-1:-1:-1;15345:17:0;;15365:22;;15386:1;;15365:22;:::i;:::-;15345:42;;15422:9;15408:10;:23;15404:385;;15452:17;15472:3;:11;;15484:9;15472:22;;;;;;;;:::i;:::-;;;;;;;;;15452:42;;15622:9;15596:3;:11;;15608:10;15596:23;;;;;;;;:::i;:::-;;;;;;;;;;;;:35;;;;15737:25;;;:14;;;:25;;;;;:36;;;15404:385;15870:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;15976:3;:14;;:21;15991:5;15976:21;;;;;;;;;;;15969:28;;;16021:4;16014:11;;;;;;;103558:286;103636:17;:29;;;103669:1;103636:34;103632:121;;103694:47;;;;;4788:42:1;4776:55;;103694:47:0;;;4758:74:1;4731:18;;103694:47:0;4587:251:1;103632:121:0;102666:66;103763:73;;;;;;;;;;;;;;;103558:286::o;65928:256::-;66011:12;66037;66051:23;66078:6;:19;;66098:4;66078:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66036:67;;;;66121:55;66148:6;66156:7;66165:10;66121:26;:55::i;:::-;66114:62;65928:256;-1:-1:-1;;;;;65928:256:0:o;108119:126::-;108170:9;:13;108166:72;;108207:19;;;;;;;;;;;;;;66459:597;66607:12;66637:7;66632:417;;66661:19;66669:10;66661:7;:19::i;:::-;66632:417;;;66889:17;;:22;:49;;;;-1:-1:-1;66915:18:0;;;;:23;66889:49;66885:121;;;66966:24;;;;;4788:42:1;4776:55;;66966:24:0;;;4758:74:1;4731:18;;66966:24:0;4587:251:1;66885:121:0;-1:-1:-1;67027:10:0;66459:597;-1:-1:-1;;66459:597:0:o;67613:498::-;67746:17;;:21;67742:362;;67946:10;67940:17;68003:15;67990:10;67986:2;67982:19;67975:44;67742:362;68073:19;;;;;;;;;;;;;;14:332:1;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:66;223:5;219:78;212:5;209:89;199:117;;312:1;309;302:12;543:226;602:6;655:2;643:9;634:7;630:23;626:32;623:52;;;671:1;668;661:12;623:52;-1:-1:-1;716:23:1;;543:226;-1:-1:-1;543:226:1:o;956:196::-;1024:20;;1084:42;1073:54;;1063:65;;1053:93;;1142:1;1139;1132:12;1053:93;956:196;;;:::o;1157:300::-;1225:6;1233;1286:2;1274:9;1265:7;1261:23;1257:32;1254:52;;;1302:1;1299;1292:12;1254:52;1347:23;;;-1:-1:-1;1413:38:1;1447:2;1432:18;;1413:38;:::i;:::-;1403:48;;1157:300;;;;;:::o;1462:260::-;1530:6;1538;1591:2;1579:9;1570:7;1566:23;1562:32;1559:52;;;1607:1;1604;1597:12;1559:52;1630:29;1649:9;1630:29;:::i;:::-;1620:39;;1678:38;1712:2;1701:9;1697:18;1678:38;:::i;1727:184::-;1779:77;1776:1;1769:88;1876:4;1873:1;1866:15;1900:4;1897:1;1890:15;1916:334;1987:2;1981:9;2043:2;2033:13;;2048:66;2029:86;2017:99;;2146:18;2131:34;;2167:22;;;2128:62;2125:88;;;2193:18;;:::i;:::-;2229:2;2222:22;1916:334;;-1:-1:-1;1916:334:1:o;2255:898::-;2332:6;2340;2393:2;2381:9;2372:7;2368:23;2364:32;2361:52;;;2409:1;2406;2399:12;2361:52;2432:29;2451:9;2432:29;:::i;:::-;2422:39;;2512:2;2501:9;2497:18;2484:32;2539:18;2531:6;2528:30;2525:50;;;2571:1;2568;2561:12;2525:50;2594:22;;2647:4;2639:13;;2635:27;-1:-1:-1;2625:55:1;;2676:1;2673;2666:12;2625:55;2716:2;2703:16;2742:18;2734:6;2731:30;2728:56;;;2764:18;;:::i;:::-;2806:116;2918:2;2849:66;2842:4;2834:6;2830:17;2826:90;2822:99;2806:116;:::i;:::-;2945:6;2938:5;2931:21;2993:7;2988:2;2979:6;2975:2;2971:15;2967:24;2964:37;2961:57;;;3014:1;3011;3004:12;2961:57;3069:6;3064:2;3060;3056:11;3051:2;3044:5;3040:14;3027:49;3121:1;3116:2;3107:6;3100:5;3096:18;3092:27;3085:38;3142:5;3132:15;;;;;2255:898;;;;;:::o;3158:348::-;3200:3;3238:5;3232:12;3265:6;3260:3;3253:19;3321:6;3314:4;3307:5;3303:16;3296:4;3291:3;3287:14;3281:47;3373:1;3366:4;3357:6;3352:3;3348:16;3344:27;3337:38;3495:4;3425:66;3420:2;3412:6;3408:15;3404:88;3399:3;3395:98;3391:109;3384:116;;;3158:348;;;;:::o;3511:220::-;3660:2;3649:9;3642:21;3623:4;3680:45;3721:2;3710:9;3706:18;3698:6;3680:45;:::i;3736:623::-;3830:6;3890:2;3878:9;3869:7;3865:23;3861:32;3905:2;3902:22;;;3920:1;3917;3910:12;3902:22;-1:-1:-1;3989:2:1;3983:9;;;4019:15;;4064:18;4049:34;;4085:22;;;4046:62;4043:88;;;4111:18;;:::i;:::-;4147:2;4140:22;4203:23;;4235:21;;4289:38;4323:2;4308:18;;4289:38;:::i;:::-;4284:2;4272:15;;4265:63;4276:6;3736:623;-1:-1:-1;;;3736:623:1:o;4843:346::-;4911:6;4919;4972:2;4960:9;4951:7;4947:23;4943:32;4940:52;;;4988:1;4985;4978:12;4940:52;-1:-1:-1;;5033:23:1;;;5153:2;5138:18;;;5125:32;;-1:-1:-1;4843:346:1:o;5425:660::-;5615:2;5627:21;;;5697:13;;5600:18;;;5719:22;;;5567:4;;5798:15;;;5772:2;5757:18;;;5567:4;5841:218;5855:6;5852:1;5849:13;5841:218;;;5920:13;;5935:42;5916:62;5904:75;;6008:2;6034:15;;;;5999:12;;;;5877:1;5870:9;5841:218;;;-1:-1:-1;6076:3:1;;5425:660;-1:-1:-1;;;;;5425:660:1:o;6715:276::-;6586:12;;6574:25;;6652:4;6641:16;;;6635:23;6660:42;6631:72;6615:14;;;6608:96;6919:2;6904:18;;6931:54;6503:207;6996:700;7075:6;7083;7091;7144:2;7132:9;7123:7;7119:23;7115:32;7112:52;;;7160:1;7157;7150:12;7112:52;7205:23;;;-1:-1:-1;7303:2:1;7288:18;;7275:32;7330:18;7319:30;;7316:50;;;7362:1;7359;7352:12;7316:50;7385:22;;7438:4;7430:13;;7426:27;-1:-1:-1;7416:55:1;;7467:1;7464;7457:12;7416:55;7507:2;7494:16;7533:18;7525:6;7522:30;7519:50;;;7565:1;7562;7555:12;7519:50;7610:7;7605:2;7596:6;7592:2;7588:15;7584:24;7581:37;7578:57;;;7631:1;7628;7621:12;7578:57;6996:700;;7662:2;7654:11;;;;;-1:-1:-1;7684:6:1;;-1:-1:-1;;;6996:700:1:o;7701:186::-;7760:6;7813:2;7801:9;7792:7;7788:23;7784:32;7781:52;;;7829:1;7826;7819:12;7781:52;7852:29;7871:9;7852:29;:::i;7892:710::-;8152:2;8164:21;;;8234:13;;8137:18;;;8256:22;;;8104:4;;8335:15;;;8309:2;8294:18;;;8104:4;8378:198;8392:6;8389:1;8386:13;8378:198;;;8441:55;8492:3;8483:6;8477:13;6586:12;;6574:25;;6652:4;6641:16;;;6635:23;6660:42;6631:72;6615:14;;6608:96;6503:207;8441:55;8563:2;8551:15;;;;;8525:2;8516:12;;;;;8414:1;8407:9;8378:198;;10124:277;10191:6;10244:2;10232:9;10223:7;10219:23;10215:32;10212:52;;;10260:1;10257;10250:12;10212:52;10292:9;10286:16;10345:5;10338:13;10331:21;10324:5;10321:32;10311:60;;10367:1;10364;10357:12;10406:184;10458:77;10455:1;10448:88;10555:4;10552:1;10545:15;10579:4;10576:1;10569:15;10595:125;10660:9;;;10681:10;;;10678:36;;;10694:18;;:::i;10725:542::-;10966:2;10955:9;10948:21;10929:4;10992:45;11033:2;11022:9;11018:18;11010:6;10992:45;:::i;:::-;11085:9;11077:6;11073:22;11068:2;11057:9;11053:18;11046:50;11119:33;11145:6;11137;11119:33;:::i;:::-;11105:47;;11200:9;11192:6;11188:22;11183:2;11172:9;11168:18;11161:50;11228:33;11254:6;11246;11228:33;:::i;:::-;11220:41;10725:542;-1:-1:-1;;;;;;10725:542:1:o;11272:184::-;11342:6;11395:2;11383:9;11374:7;11370:23;11366:32;11363:52;;;11411:1;11408;11401:12;11363:52;-1:-1:-1;11434:16:1;;11272:184;-1:-1:-1;11272:184:1:o;12060:271::-;12243:6;12235;12230:3;12217:33;12199:3;12269:16;;12294:13;;;12269:16;12060:271;-1:-1:-1;12060:271:1:o;12589:301::-;12718:3;12756:6;12750:13;12802:6;12795:4;12787:6;12783:17;12778:3;12772:37;12864:1;12828:16;;12853:13;;;-1:-1:-1;12828:16:1;12589:301;-1:-1:-1;12589:301:1:o;12895:518::-;13080:6;13069:9;13062:25;13123:2;13118;13107:9;13103:18;13096:30;13162:6;13157:2;13146:9;13142:18;13135:34;13219:6;13211;13206:2;13195:9;13191:18;13178:48;13275:1;13246:22;;;13270:2;13242:31;;;13235:42;;;;13329:2;13317:15;;;13334:66;13313:88;13298:104;13294:113;;12895:518;-1:-1:-1;;12895:518:1:o;13720:184::-;13772:77;13769:1;13762:88;13869:4;13866:1;13859:15;13893:4;13890:1;13883:15;13909:128;13976:9;;;13997:11;;;13994:37;;;14011:18;;:::i;14042:184::-;14094:77;14091:1;14084:88;14191:4;14188:1;14181:15;14215:4;14212:1;14205:15

Swarm Source

ipfs://fb9ee1bf715387e4c9ff6019b0dadf149d4fbf8d9d881aa9a158e8bab001713e

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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
Loading...
Loading
Loading...
Loading
[ 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.