ETH Price: $3,135.21 (+1.93%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint Wrapped Poc...217236532025-01-28 14:35:1132 hrs ago1738074911IN
0x0d006D9e...fdb6f78dd
0 ETH0.001079717.46642209
Mint Wrapped Poc...217021482025-01-25 14:34:474 days ago1737815687IN
0x0d006D9e...fdb6f78dd
0 ETH0.000898147.04243513
Mint Wrapped Poc...216981162025-01-25 1:02:594 days ago1737766979IN
0x0d006D9e...fdb6f78dd
0 ETH0.00086646.79669136
Mint Wrapped Poc...216980222025-01-25 0:43:594 days ago1737765839IN
0x0d006D9e...fdb6f78dd
0 ETH0.001136937.03175011
Mint Wrapped Poc...216966542025-01-24 20:08:475 days ago1737749327IN
0x0d006D9e...fdb6f78dd
0 ETH0.001352469.35249171
Mint Wrapped Poc...216901222025-01-23 22:16:116 days ago1737670571IN
0x0d006D9e...fdb6f78dd
0 ETH0.001247739.78535375
Mint Wrapped Poc...216875252025-01-23 13:35:476 days ago1737639347IN
0x0d006D9e...fdb6f78dd
0 ETH0.0025189617.41613212
Mint Wrapped Poc...216873262025-01-23 12:55:236 days ago1737636923IN
0x0d006D9e...fdb6f78dd
0 ETH0.000983029.46906805
Mint Wrapped Poc...216872892025-01-23 12:47:596 days ago1737636479IN
0x0d006D9e...fdb6f78dd
0 ETH0.001214918.40272681
Mint Wrapped Poc...216825662025-01-22 20:58:357 days ago1737579515IN
0x0d006D9e...fdb6f78dd
0 ETH0.001612099.96755598
Mint Wrapped Poc...216812792025-01-22 16:39:237 days ago1737563963IN
0x0d006D9e...fdb6f78dd
0 ETH0.0016768611.59575778
Mint Wrapped Poc...216803692025-01-22 13:36:237 days ago1737552983IN
0x0d006D9e...fdb6f78dd
0 ETH0.0016692311.54207756
Mint Wrapped Poc...216770252025-01-22 2:24:477 days ago1737512687IN
0x0d006D9e...fdb6f78dd
0 ETH0.000979587.68166227
Mint Wrapped Poc...216765872025-01-22 0:57:117 days ago1737507431IN
0x0d006D9e...fdb6f78dd
0 ETH0.001539289.51949466
Mint Wrapped Poc...216764542025-01-22 0:30:117 days ago1737505811IN
0x0d006D9e...fdb6f78dd
0 ETH0.001013287.94746426
Mint Wrapped Poc...216763662025-01-22 0:12:117 days ago1737504731IN
0x0d006D9e...fdb6f78dd
0 ETH0.0013333410.45679146
Mint Wrapped Poc...216742242025-01-21 17:01:358 days ago1737478895IN
0x0d006D9e...fdb6f78dd
0 ETH0.0024770717.12937533
Mint Wrapped Poc...216737892025-01-21 15:34:238 days ago1737473663IN
0x0d006D9e...fdb6f78dd
0 ETH0.0017022411.77027792
Mint Wrapped Poc...216691842025-01-21 0:07:358 days ago1737418055IN
0x0d006D9e...fdb6f78dd
0 ETH0.0025788617.83472174
Mint Wrapped Poc...216684142025-01-20 21:32:479 days ago1737408767IN
0x0d006D9e...fdb6f78dd
0 ETH0.0023688518.58132198
Mint Wrapped Poc...216678002025-01-20 19:29:239 days ago1737401363IN
0x0d006D9e...fdb6f78dd
0 ETH0.0044946731.07880925
Mint Wrapped Poc...216676482025-01-20 18:58:599 days ago1737399539IN
0x0d006D9e...fdb6f78dd
0 ETH0.0039515527.32109703
Mint Wrapped Poc...216669952025-01-20 16:47:599 days ago1737391679IN
0x0d006D9e...fdb6f78dd
0 ETH0.0051801340.6368292
Mint Wrapped Poc...216669892025-01-20 16:46:479 days ago1737391607IN
0x0d006D9e...fdb6f78dd
0 ETH0.0059267640.98788418
Mint Wrapped Poc...216662052025-01-20 14:08:599 days ago1737382139IN
0x0d006D9e...fdb6f78dd
0 ETH0.0042153229.14962657
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
186017212023-11-18 22:34:11438 days ago1700346851
0x0d006D9e...fdb6f78dd
0.01021297 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MintController

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 9 : MintController.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol";

interface IWPokt {
    function batchMint(address[] calldata recipients, uint256[] calldata amounts, uint256[] calldata nonces) external;

    function mint(address recipient, uint256 amount, uint256 nonce) external;

    function hasRole(bytes32 role, address account) external returns (bool);
}

contract MintController is EIP712 {
    /*//////////////////////////////////////////////////////////////
    // Immutable Storage
    //////////////////////////////////////////////////////////////*/

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
    IWPokt public immutable wPokt;

    /*//////////////////////////////////////////////////////////////
    // State
    //////////////////////////////////////////////////////////////*/

    mapping(address => bool) public validators;
    uint256 public validatorCount;
    uint256 public signerThreshold = 50; // out of 100

    uint256 private _currentMintLimit = 335_000 ether;
    uint256 public lastMint;

    uint256 public maxMintLimit = 335_000 ether;
    uint256 public mintPerSecond = 3.8773 ether;

    /*//////////////////////////////////////////////////////////////
    // Events and Errors
    //////////////////////////////////////////////////////////////*/

    error OverMintLimit();
    error NonAdmin();
    error InvalidSignatureRatio();
    error InvalidSignatures();
    error InvalidRemoveValidator();
    error InvalidAddValidator();
    error NonZero();
    error BelowMinThreshold();
    error InvalidCooldownConfig();

    event MintCooldownSet(uint256 newLimit, uint256 newCooldown);
    event NewValidator(address indexed validator);
    event RemovedValidator(address indexed validator);
    event CurrentMintLimit(uint256 indexed limit, uint256 indexed lastMint);
    event SignerThresholdSet(uint256 indexed ratio);

    // Data object for signing and digest construction
    struct MintData {
        address recipient;
        uint256 amount;
        uint256 nonce;
    }

    constructor(address _wPokt) EIP712("MintController", "1") {
        if (_wPokt == address(0)) {
            revert NonZero();
        }
        wPokt = IWPokt(_wPokt);
    }

    /*//////////////////////////////////////////////////////////////
    // Modifiers
    //////////////////////////////////////////////////////////////*/

    /// @dev Ensure the function is only called by admin.
    /// If caller is not an admin, throws an error message.
    modifier onlyAdmin() {
        if (!wPokt.hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {
            revert NonAdmin();
        }
        _;
    }

    /*//////////////////////////////////////////////////////////////
    // Access Control
    //////////////////////////////////////////////////////////////*/

    /// @notice Adds a validator to the list of validators.
    /// @dev Can only be called by admin.
    /// Emits a NewValidator event upon successful addition.
    /// @param validator The address of the validator to add.
    function addValidator(address validator) external onlyAdmin {
        if (validator == address(0)) {
            revert NonZero();
        }
        if (validators[validator] == true) {
            revert InvalidAddValidator();
        }
        validators[validator] = true;
        validatorCount++;
        emit NewValidator(validator);
    }

    /// @notice Removes a validator from the list of validators.
    /// @dev Can only be called by admin.
    /// Emits a RemovedValidator event upon successful removal.
    /// @param validator The address of the validator to remove.
    function removeValidator(address validator) external onlyAdmin {
        if (validatorCount - 1 < signerThreshold) {
            revert BelowMinThreshold();
        }
        if (validator == address(0)) {
            revert NonZero();
        }
        if (validators[validator] == false) {
            revert InvalidRemoveValidator();
        }
        validators[validator] = false;
        validatorCount--;
        emit RemovedValidator(validator);
    }

    /// @notice Sets the signature ratio.
    /// @dev Can only be called by admin.
    /// Emits a SignerThresholdSet event upon successful setting.
    /// @param signatureRatio The new signature ratio to set.
    function setSignerThreshold(uint256 signatureRatio) external onlyAdmin {
        if (signatureRatio > validatorCount || signatureRatio == 0 || validatorCount / 2 > signatureRatio) {
            revert InvalidSignatureRatio();
        }
        signerThreshold = signatureRatio;
        emit SignerThresholdSet(signatureRatio);
    }

    /// @notice Sets the mint limit and mint per second cooldown rate.
    /// @dev Can only be called by admin.
    /// Emits a MintCooldownSet event upon successful setting.
    /// @param newLimit The new mint limit to set.
    /// @param newMintPerSecond The new mint per second cooldown rate to set.
    function setMintCooldown(uint256 newLimit, uint256 newMintPerSecond) external onlyAdmin {
        if (newLimit < mintPerSecond) {
            revert InvalidCooldownConfig();
        }
        maxMintLimit = newLimit;
        mintPerSecond = newMintPerSecond;

        emit MintCooldownSet(newLimit, newMintPerSecond);
    }

    /*//////////////////////////////////////////////////////////////
    // Mutative Public Functions
    //////////////////////////////////////////////////////////////*/

    /// @notice Mint wrapped POKT tokens to a specific address with a signature.
    /// @dev Can be called by anyone
    /// If the amount to mint is more than the current mint limit, transaction is reverted.
    /// @param data The mint data to be verified.
    /// @param signatures The signatures to be verified.
    function mintWrappedPocket(MintData calldata data, bytes[] calldata signatures) external {
        if (_verify(data, signatures) == false) {
            revert InvalidSignatures();
        }

        uint256 remainingMintable = _enforceMintLimit(data.amount);
        wPokt.mint(data.recipient, data.amount, data.nonce);
        emit CurrentMintLimit(remainingMintable, lastMint);
    }

    /*//////////////////////////////////////////////////////////////
    // Internal Functions
    //////////////////////////////////////////////////////////////*/

    /// @notice Verifies the mint data signature.
    /// @dev internal function to be called by mintWithSignature.
    /// @param _data The mint data to be verified.
    /// @param _signatures The signatures to be verified.
    /// @return True if the signatures are valid, false otherwise.
    function _verify(MintData calldata _data, bytes[] calldata _signatures) internal view returns (bool) {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    keccak256("MintData(address recipient,uint256 amount,uint256 nonce)"),
                    _data.recipient,
                    _data.amount,
                    _data.nonce
                )
            )
        );

        address lastSigner;
        address currentSigner;

        uint256 validSignatures = 0;
        uint256 signatureLength = _signatures.length;

        for (uint256 i; i < signatureLength;) {
            currentSigner = ECDSA.recover(digest, _signatures[i]);
            if (validators[currentSigner] && currentSigner > lastSigner) {
                validSignatures++;
                lastSigner = currentSigner;
            }
            unchecked {
                ++i;
            }
        }

        return validSignatures > 0 && validSignatures >= signerThreshold;
    }

    /// @dev Updates the mint limit based on the cooldown mechanism.
    /// @param _amount The amount of tokens to mint.
    /// @return The updated mint limit.
    function _enforceMintLimit(uint256 _amount) internal returns (uint256) {
        uint256 timePassed = block.timestamp - lastMint;
        uint256 mintableFromCooldown = timePassed * mintPerSecond;
        uint256 previousMintLimit = _currentMintLimit;
        uint256 maxMintable = maxMintLimit;

        // We enforce that amount is not greater than the maximum mint or the current allowed by cooldown
        if (_amount > mintableFromCooldown + previousMintLimit || _amount > maxMintable) {
            revert OverMintLimit();
        }

        // If the cooldown has fully recovered; we are allowed to mint up to the maximum amount
        if (previousMintLimit + mintableFromCooldown >= maxMintable) {
            _currentMintLimit = maxMintable - _amount;
            lastMint = block.timestamp;
            return maxMintable - _amount;

            // Otherwise the cooldown has not fully recovered; we are allowed to mint up to the recovered amount
        } else {
            uint256 mintable = previousMintLimit + mintableFromCooldown;
            _currentMintLimit = mintable - _amount;
            lastMint = block.timestamp;
            return mintable - _amount;
        }
    }

    /*//////////////////////////////////////////////////////////////
    // View Functions
    //////////////////////////////////////////////////////////////*/
    function currentMintLimit() external view returns (uint256) {
        uint256 mintableFromCooldown = (block.timestamp - lastMint) * mintPerSecond;
        if (mintableFromCooldown + _currentMintLimit > maxMintLimit) {
            return maxMintLimit;
        } else {
            return mintableFromCooldown + _currentMintLimit;
        }
    }

    function lastMintLimit() external view returns (uint256) {
        return _currentMintLimit;
    }
}

File 2 of 9 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.8;

import "./ECDSA.sol";
import "../ShortStrings.sol";
import "../../interfaces/IERC5267.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * _Available since v3.4._
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
 */
abstract contract EIP712 is IERC5267 {
    using ShortStrings for *;

    bytes32 private constant _TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _cachedDomainSeparator;
    uint256 private immutable _cachedChainId;
    address private immutable _cachedThis;

    bytes32 private immutable _hashedName;
    bytes32 private immutable _hashedVersion;

    ShortString private immutable _name;
    ShortString private immutable _version;
    string private _nameFallback;
    string private _versionFallback;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        _name = name.toShortStringWithFallback(_nameFallback);
        _version = version.toShortStringWithFallback(_versionFallback);
        _hashedName = keccak256(bytes(name));
        _hashedVersion = keccak256(bytes(version));

        _cachedChainId = block.chainid;
        _cachedDomainSeparator = _buildDomainSeparator();
        _cachedThis = address(this);
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
            return _cachedDomainSeparator;
        } else {
            return _buildDomainSeparator();
        }
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {EIP-5267}.
     *
     * _Available since v4.9._
     */
    function eip712Domain()
        public
        view
        virtual
        override
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _name.toStringWithFallback(_nameFallback),
            _version.toStringWithFallback(_versionFallback),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }
}

File 3 of 9 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

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

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

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

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

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

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

        return (signer, RecoverError.NoError);
    }

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

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 4 of 9 : ShortStrings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.8;

import "./StorageSlot.sol";

// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |
// | length  | 0x                                                              BB |
type ShortString is bytes32;

/**
 * @dev This library provides functions to convert short memory strings
 * into a `ShortString` type that can be used as an immutable variable.
 *
 * Strings of arbitrary length can be optimized using this library if
 * they are short enough (up to 31 bytes) by packing them with their
 * length (1 byte) in a single EVM word (32 bytes). Additionally, a
 * fallback mechanism can be used for every other case.
 *
 * Usage example:
 *
 * ```solidity
 * contract Named {
 *     using ShortStrings for *;
 *
 *     ShortString private immutable _name;
 *     string private _nameFallback;
 *
 *     constructor(string memory contractName) {
 *         _name = contractName.toShortStringWithFallback(_nameFallback);
 *     }
 *
 *     function name() external view returns (string memory) {
 *         return _name.toStringWithFallback(_nameFallback);
 *     }
 * }
 * ```
 */
library ShortStrings {
    // Used as an identifier for strings longer than 31 bytes.
    bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;

    error StringTooLong(string str);
    error InvalidShortString();

    /**
     * @dev Encode a string of at most 31 chars into a `ShortString`.
     *
     * This will trigger a `StringTooLong` error is the input string is too long.
     */
    function toShortString(string memory str) internal pure returns (ShortString) {
        bytes memory bstr = bytes(str);
        if (bstr.length > 31) {
            revert StringTooLong(str);
        }
        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
    }

    /**
     * @dev Decode a `ShortString` back to a "normal" string.
     */
    function toString(ShortString sstr) internal pure returns (string memory) {
        uint256 len = byteLength(sstr);
        // using `new string(len)` would work locally but is not memory safe.
        string memory str = new string(32);
        /// @solidity memory-safe-assembly
        assembly {
            mstore(str, len)
            mstore(add(str, 0x20), sstr)
        }
        return str;
    }

    /**
     * @dev Return the length of a `ShortString`.
     */
    function byteLength(ShortString sstr) internal pure returns (uint256) {
        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
        if (result > 31) {
            revert InvalidShortString();
        }
        return result;
    }

    /**
     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
     */
    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
        if (bytes(value).length < 32) {
            return toShortString(value);
        } else {
            StorageSlot.getStringSlot(store).value = value;
            return ShortString.wrap(_FALLBACK_SENTINEL);
        }
    }

    /**
     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     */
    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return toString(value);
        } else {
            return store;
        }
    }

    /**
     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     *
     * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
     */
    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return byteLength(value);
        } else {
            return bytes(store).length;
        }
    }
}

File 5 of 9 : IERC5267.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 6 of 9 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 7 of 9 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.0;

/**
 * @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 ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
 * _Available since v4.9 for `string`, `bytes`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 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) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

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

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

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

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            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) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            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) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

File 8 of 9 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 9 of 9 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_wPokt","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BelowMinThreshold","type":"error"},{"inputs":[],"name":"InvalidAddValidator","type":"error"},{"inputs":[],"name":"InvalidCooldownConfig","type":"error"},{"inputs":[],"name":"InvalidRemoveValidator","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"InvalidSignatureRatio","type":"error"},{"inputs":[],"name":"InvalidSignatures","type":"error"},{"inputs":[],"name":"NonAdmin","type":"error"},{"inputs":[],"name":"NonZero","type":"error"},{"inputs":[],"name":"OverMintLimit","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"limit","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"lastMint","type":"uint256"}],"name":"CurrentMintLimit","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCooldown","type":"uint256"}],"name":"MintCooldownSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"NewValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"RemovedValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"ratio","type":"uint256"}],"name":"SignerThresholdSet","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"validator","type":"address"}],"name":"addValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"internalType":"struct MintController.MintData","name":"data","type":"tuple"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"mintWrappedPocket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"validator","type":"address"}],"name":"removeValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"},{"internalType":"uint256","name":"newMintPerSecond","type":"uint256"}],"name":"setMintCooldown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"signatureRatio","type":"uint256"}],"name":"setSignerThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validatorCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wPokt","outputs":[{"internalType":"contract IWPokt","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61018060405260326004556946f062ea65ee536000006005556946f062ea65ee536000006007556735ceefcea39f40006008553480156200003f57600080fd5b506040516200190638038062001906833981016040819052620000629162000215565b604080518082018252600e81526d26b4b73a21b7b73a3937b63632b960911b602080830191909152825180840190935260018352603160f81b9083015290620000ad82600062000190565b61012052620000be81600162000190565b61014052815160208084019190912060e052815190820120610100524660a0526200014c60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0381166200017d5760405163dfa8318d60e01b815260040160405180910390fd5b6001600160a01b0316610160526200042d565b6000602083511015620001b057620001a883620001c9565b9050620001c3565b81620001bd8482620002ec565b5060ff90505b92915050565b600080829050601f8151111562000200578260405163305a27a960e01b8152600401620001f79190620003b8565b60405180910390fd5b80516200020d8262000408565b179392505050565b6000602082840312156200022857600080fd5b81516001600160a01b03811681146200024057600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200027257607f821691505b6020821081036200029357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e757600081815260208120601f850160051c81016020861015620002c25750805b601f850160051c820191505b81811015620002e357828155600101620002ce565b5050505b505050565b81516001600160401b0381111562000308576200030862000247565b62000320816200031984546200025d565b8462000299565b602080601f8311600181146200035857600084156200033f5750858301515b600019600386901b1c1916600185901b178555620002e3565b600085815260208120601f198616915b82811015620003895788860151825594840194600190910190840162000368565b5085821015620003a85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b81811015620003e757858101830151858201604001528201620003c9565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620002935760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051611450620004b6600039600081816101de0152818161029301528181610383015281816104a80152818161065401526107d401526000610908015260006108de01526000610df801526000610dd001526000610d2b01526000610d5501526000610d7f01526114506000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806359aa685911610097578063a40c3eab11610066578063a40c3eab146101c8578063a4a4f390146101d0578063d72a828b146101d9578063fa52c7d81461021857600080fd5b806359aa68591461018957806370e2f8271461019c57806384b0196e146101a5578063a217fddf146101c057600080fd5b80632f99582a116100d35780632f99582a1461015257806340a141ff1461015a5780634d238c8e1461016d578063586fc5b51461018057600080fd5b80630f22ed52146101055780630f43a6771461011a578063251b819214610136578063272c444d14610149575b600080fd5b6101186101133660046110d1565b61024b565b005b61012360035481565b6040519081526020015b60405180910390f35b61011861014436600461115f565b610367565b61012360085481565b600554610123565b610118610168366004611178565b61048c565b61011861017b366004611178565b610638565b61012360065481565b6101186101973660046111a8565b6107b8565b61012360075481565b6101ad6108d0565b60405161012d9796959493929190611210565b610123600081565b610123610958565b61012360045481565b6102007f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161012d565b61023b610226366004611178565b60026020526000908152604090205460ff1681565b604051901515815260200161012d565b6102568383836109aa565b15156000036102785760405163274cf40160e01b815260040160405180910390fd5b60006102878460200135610b17565b90506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663156e29f66102c56020870187611178565b604080516001600160e01b031960e085901b1681526001600160a01b039092166004830152602088013560248301528701356044820152606401600060405180830381600087803b15801561031957600080fd5b505af115801561032d573d6000803e3d6000fd5b50505050600654817f37ce17c2014463ff310cd0d994a30795f5c48b6d6c3104ba83677f096383e3e460405160405180910390a350505050565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906391d14854906044016020604051808303816000875af11580156103d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f891906112a6565b61041557604051638202605b60e01b815260040160405180910390fd5b600354811180610423575080155b8061043b575080600260035461043991906112de565b115b15610459576040516317630fb160e01b815260040160405180910390fd5b600481905560405181907f030f8d880b0bf7b6311c00e028809570118cbccc8302e08c8776ad77d10f505e90600090a250565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906391d14854906044016020604051808303816000875af11580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051d91906112a6565b61053a57604051638202605b60e01b815260040160405180910390fd5b600454600160035461054c9190611300565b101561056b5760405163352a97b560e11b815260040160405180910390fd5b6001600160a01b0381166105925760405163dfa8318d60e01b815260040160405180910390fd5b6001600160a01b03811660009081526002602052604081205460ff16151590036105ce57604051622436a360e81b815260040160405180910390fd5b6001600160a01b0381166000908152600260205260408120805460ff1916905560038054916105fc83611313565b90915550506040516001600160a01b038216907fb625c55cf7e37b54fcd18bc4edafdf3f4f9acd59a5ec824c77c795dcb2d6507090600090a250565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906391d14854906044016020604051808303816000875af11580156106a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c991906112a6565b6106e657604051638202605b60e01b815260040160405180910390fd5b6001600160a01b03811661070d5760405163dfa8318d60e01b815260040160405180910390fd5b6001600160a01b03811660009081526002602052604090205460ff16151560010361074b576040516368a1752960e01b815260040160405180910390fd5b6001600160a01b0381166000908152600260205260408120805460ff19166001179055600380549161077c8361132a565b90915550506040516001600160a01b038216907f29b4645f23b856eccf12b3b38e036c3221ca1b5a9afa2a83aea7ead34e47987c90600090a250565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906391d14854906044016020604051808303816000875af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084991906112a6565b61086657604051638202605b60e01b815260040160405180910390fd5b60085482101561088957604051632ea7e0d360e11b815260040160405180910390fd5b6007829055600881905560408051838152602081018390527f2c1471be9f5586272d41bc8d7d0ce89b3b10e4693755e30752510cb88d42fdf5910160405180910390a15050565b6000606080828080836109037f000000000000000000000000000000000000000000000000000000000000000083610be1565b61092e7f00000000000000000000000000000000000000000000000000000000000000006001610be1565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000806008546006544261096c9190611300565b6109769190611343565b905060075460055482610989919061135a565b111561099757505060075490565b6005546109a4908261135a565b91505090565b600080610a2a7f6721b4026585b4fadb77a5437a5afbb668cdaaefcd24e850f179a5e0c2eb1b9a6109de6020880188611178565b604080516020818101949094526001600160a01b039092168282015291880135606082015290870135608082015260a00160405160208183030381529060405280519060200120610c8e565b90506000808085815b81811015610af757610a9d868a8a84818110610a5157610a5161136d565b9050602002810190610a639190611383565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cbb92505050565b6001600160a01b03811660009081526002602052604090205490945060ff168015610ad95750846001600160a01b0316846001600160a01b0316115b15610aef5782610ae88161132a565b9350508394505b600101610a33565b50600082118015610b0a57506004548210155b9998505050505050505050565b60008060065442610b289190611300565b9050600060085482610b3a9190611343565b60055460075491925090610b4e828461135a565b861180610b5a57508086115b15610b785760405163436a537960e01b815260040160405180910390fd5b80610b83848461135a565b10610bad57610b928682611300565b60055542600655610ba38682611300565b9695505050505050565b6000610bb9848461135a565b9050610bc58782611300565b60055542600655610bd68782611300565b979650505050505050565b606060ff8314610bfb57610bf483610cdf565b9050610c88565b818054610c07906113ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610c33906113ca565b8015610c805780601f10610c5557610100808354040283529160200191610c80565b820191906000526020600020905b815481529060010190602001808311610c6357829003601f168201915b505050505090505b92915050565b6000610c88610c9b610d1e565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610cca8585610e4e565b91509150610cd781610e93565b509392505050565b60606000610cec83610fe5565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610d7757507f000000000000000000000000000000000000000000000000000000000000000046145b15610da157507f000000000000000000000000000000000000000000000000000000000000000090565b610e49604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b6000808251604103610e845760208301516040840151606085015160001a610e788782858561100d565b94509450505050610e8c565b506000905060025b9250929050565b6000816004811115610ea757610ea7611404565b03610eaf5750565b6001816004811115610ec357610ec3611404565b03610f155760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064015b60405180910390fd5b6002816004811115610f2957610f29611404565b03610f765760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f0c565b6003816004811115610f8a57610f8a611404565b03610fe25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610f0c565b50565b600060ff8216601f811115610c8857604051632cd44ac360e21b815260040160405180910390fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561104457506000905060036110c8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611098573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110c1576000600192509250506110c8565b9150600090505b94509492505050565b600080600083850360808112156110e757600080fd5b60608112156110f557600080fd5b50839250606084013567ffffffffffffffff8082111561111457600080fd5b818601915086601f83011261112857600080fd5b81358181111561113757600080fd5b8760208260051b850101111561114c57600080fd5b6020830194508093505050509250925092565b60006020828403121561117157600080fd5b5035919050565b60006020828403121561118a57600080fd5b81356001600160a01b03811681146111a157600080fd5b9392505050565b600080604083850312156111bb57600080fd5b50508035926020909101359150565b6000815180845260005b818110156111f0576020818501810151868301820152016111d4565b506000602082860101526020601f19601f83011685010191505092915050565b60ff60f81b881681526000602060e08184015261123060e084018a6111ca565b8381036040850152611242818a6111ca565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561129457835183529284019291840191600101611278565b50909c9b505050505050505050505050565b6000602082840312156112b857600080fd5b815180151581146111a157600080fd5b634e487b7160e01b600052601160045260246000fd5b6000826112fb57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610c8857610c886112c8565b600081611322576113226112c8565b506000190190565b60006001820161133c5761133c6112c8565b5060010190565b8082028115828204841417610c8857610c886112c8565b80820180821115610c8857610c886112c8565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261139a57600080fd5b83018035915067ffffffffffffffff8211156113b557600080fd5b602001915036819003821315610e8c57600080fd5b600181811c908216806113de57607f821691505b6020821081036113fe57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209728b656a0856a84db75d04cdcb0c0f7aba9591534a64bcd687d3b0cc753686664736f6c6343000814003300000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d7

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c806359aa685911610097578063a40c3eab11610066578063a40c3eab146101c8578063a4a4f390146101d0578063d72a828b146101d9578063fa52c7d81461021857600080fd5b806359aa68591461018957806370e2f8271461019c57806384b0196e146101a5578063a217fddf146101c057600080fd5b80632f99582a116100d35780632f99582a1461015257806340a141ff1461015a5780634d238c8e1461016d578063586fc5b51461018057600080fd5b80630f22ed52146101055780630f43a6771461011a578063251b819214610136578063272c444d14610149575b600080fd5b6101186101133660046110d1565b61024b565b005b61012360035481565b6040519081526020015b60405180910390f35b61011861014436600461115f565b610367565b61012360085481565b600554610123565b610118610168366004611178565b61048c565b61011861017b366004611178565b610638565b61012360065481565b6101186101973660046111a8565b6107b8565b61012360075481565b6101ad6108d0565b60405161012d9796959493929190611210565b610123600081565b610123610958565b61012360045481565b6102007f00000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d781565b6040516001600160a01b03909116815260200161012d565b61023b610226366004611178565b60026020526000908152604090205460ff1681565b604051901515815260200161012d565b6102568383836109aa565b15156000036102785760405163274cf40160e01b815260040160405180910390fd5b60006102878460200135610b17565b90506001600160a01b037f00000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d71663156e29f66102c56020870187611178565b604080516001600160e01b031960e085901b1681526001600160a01b039092166004830152602088013560248301528701356044820152606401600060405180830381600087803b15801561031957600080fd5b505af115801561032d573d6000803e3d6000fd5b50505050600654817f37ce17c2014463ff310cd0d994a30795f5c48b6d6c3104ba83677f096383e3e460405160405180910390a350505050565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d76001600160a01b0316906391d14854906044016020604051808303816000875af11580156103d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f891906112a6565b61041557604051638202605b60e01b815260040160405180910390fd5b600354811180610423575080155b8061043b575080600260035461043991906112de565b115b15610459576040516317630fb160e01b815260040160405180910390fd5b600481905560405181907f030f8d880b0bf7b6311c00e028809570118cbccc8302e08c8776ad77d10f505e90600090a250565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d76001600160a01b0316906391d14854906044016020604051808303816000875af11580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051d91906112a6565b61053a57604051638202605b60e01b815260040160405180910390fd5b600454600160035461054c9190611300565b101561056b5760405163352a97b560e11b815260040160405180910390fd5b6001600160a01b0381166105925760405163dfa8318d60e01b815260040160405180910390fd5b6001600160a01b03811660009081526002602052604081205460ff16151590036105ce57604051622436a360e81b815260040160405180910390fd5b6001600160a01b0381166000908152600260205260408120805460ff1916905560038054916105fc83611313565b90915550506040516001600160a01b038216907fb625c55cf7e37b54fcd18bc4edafdf3f4f9acd59a5ec824c77c795dcb2d6507090600090a250565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d76001600160a01b0316906391d14854906044016020604051808303816000875af11580156106a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c991906112a6565b6106e657604051638202605b60e01b815260040160405180910390fd5b6001600160a01b03811661070d5760405163dfa8318d60e01b815260040160405180910390fd5b6001600160a01b03811660009081526002602052604090205460ff16151560010361074b576040516368a1752960e01b815260040160405180910390fd5b6001600160a01b0381166000908152600260205260408120805460ff19166001179055600380549161077c8361132a565b90915550506040516001600160a01b038216907f29b4645f23b856eccf12b3b38e036c3221ca1b5a9afa2a83aea7ead34e47987c90600090a250565b604051632474521560e21b8152600060048201523360248201527f00000000000000000000000067f4c72a50f8df6487720261e188f2abe83f57d76001600160a01b0316906391d14854906044016020604051808303816000875af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084991906112a6565b61086657604051638202605b60e01b815260040160405180910390fd5b60085482101561088957604051632ea7e0d360e11b815260040160405180910390fd5b6007829055600881905560408051838152602081018390527f2c1471be9f5586272d41bc8d7d0ce89b3b10e4693755e30752510cb88d42fdf5910160405180910390a15050565b6000606080828080836109037f4d696e74436f6e74726f6c6c657200000000000000000000000000000000000e83610be1565b61092e7f31000000000000000000000000000000000000000000000000000000000000016001610be1565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000806008546006544261096c9190611300565b6109769190611343565b905060075460055482610989919061135a565b111561099757505060075490565b6005546109a4908261135a565b91505090565b600080610a2a7f6721b4026585b4fadb77a5437a5afbb668cdaaefcd24e850f179a5e0c2eb1b9a6109de6020880188611178565b604080516020818101949094526001600160a01b039092168282015291880135606082015290870135608082015260a00160405160208183030381529060405280519060200120610c8e565b90506000808085815b81811015610af757610a9d868a8a84818110610a5157610a5161136d565b9050602002810190610a639190611383565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cbb92505050565b6001600160a01b03811660009081526002602052604090205490945060ff168015610ad95750846001600160a01b0316846001600160a01b0316115b15610aef5782610ae88161132a565b9350508394505b600101610a33565b50600082118015610b0a57506004548210155b9998505050505050505050565b60008060065442610b289190611300565b9050600060085482610b3a9190611343565b60055460075491925090610b4e828461135a565b861180610b5a57508086115b15610b785760405163436a537960e01b815260040160405180910390fd5b80610b83848461135a565b10610bad57610b928682611300565b60055542600655610ba38682611300565b9695505050505050565b6000610bb9848461135a565b9050610bc58782611300565b60055542600655610bd68782611300565b979650505050505050565b606060ff8314610bfb57610bf483610cdf565b9050610c88565b818054610c07906113ca565b80601f0160208091040260200160405190810160405280929190818152602001828054610c33906113ca565b8015610c805780601f10610c5557610100808354040283529160200191610c80565b820191906000526020600020905b815481529060010190602001808311610c6357829003601f168201915b505050505090505b92915050565b6000610c88610c9b610d1e565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610cca8585610e4e565b91509150610cd781610e93565b509392505050565b60606000610cec83610fe5565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000306001600160a01b037f0000000000000000000000000d006d9e862b362180eb602e5973fd1fdb6f78dd16148015610d7757507f000000000000000000000000000000000000000000000000000000000000000146145b15610da157507fd3cbed1570933c3ddaf0c88e98744e566973b3631ed2cad0e8d748d95c4e62e690565b610e49604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f99fa7e8b5fbe6e5fa9e6680610d10be48113e15007622d0fee9d50a6a227043a918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b6000808251604103610e845760208301516040840151606085015160001a610e788782858561100d565b94509450505050610e8c565b506000905060025b9250929050565b6000816004811115610ea757610ea7611404565b03610eaf5750565b6001816004811115610ec357610ec3611404565b03610f155760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064015b60405180910390fd5b6002816004811115610f2957610f29611404565b03610f765760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f0c565b6003816004811115610f8a57610f8a611404565b03610fe25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610f0c565b50565b600060ff8216601f811115610c8857604051632cd44ac360e21b815260040160405180910390fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561104457506000905060036110c8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611098573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166110c1576000600192509250506110c8565b9150600090505b94509492505050565b600080600083850360808112156110e757600080fd5b60608112156110f557600080fd5b50839250606084013567ffffffffffffffff8082111561111457600080fd5b818601915086601f83011261112857600080fd5b81358181111561113757600080fd5b8760208260051b850101111561114c57600080fd5b6020830194508093505050509250925092565b60006020828403121561117157600080fd5b5035919050565b60006020828403121561118a57600080fd5b81356001600160a01b03811681146111a157600080fd5b9392505050565b600080604083850312156111bb57600080fd5b50508035926020909101359150565b6000815180845260005b818110156111f0576020818501810151868301820152016111d4565b506000602082860101526020601f19601f83011685010191505092915050565b60ff60f81b881681526000602060e08184015261123060e084018a6111ca565b8381036040850152611242818a6111ca565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561129457835183529284019291840191600101611278565b50909c9b505050505050505050505050565b6000602082840312156112b857600080fd5b815180151581146111a157600080fd5b634e487b7160e01b600052601160045260246000fd5b6000826112fb57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610c8857610c886112c8565b600081611322576113226112c8565b506000190190565b60006001820161133c5761133c6112c8565b5060010190565b8082028115828204841417610c8857610c886112c8565b80820180821115610c8857610c886112c8565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261139a57600080fd5b83018035915067ffffffffffffffff8211156113b557600080fd5b602001915036819003821315610e8c57600080fd5b600181811c908216806113de57607f821691505b6020821081036113fe57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209728b656a0856a84db75d04cdcb0c0f7aba9591534a64bcd687d3b0cc753686664736f6c63430008140033

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

00000000000000000000000067F4C72a50f8Df6487720261E188F2abE83F57D7

-----Decoded View---------------
Arg [0] : _wPokt (address): 0x67F4C72a50f8Df6487720261E188F2abE83F57D7

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000067F4C72a50f8Df6487720261E188F2abE83F57D7


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
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.