Contract

0x827CE7E10420029A740865688eb16E00ED93537f

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Complete Quest21677672025-01-01 14:35:4015 hrs ago1735742140IN
0x827CE7E1...0ED93537f
0.202 S0.000421311.11
Complete Quest20921102024-12-31 15:48:2238 hrs ago1735660102IN
0x827CE7E1...0ED93537f
0.202 S0.000401431.1
Complete Quest20715152024-12-31 10:01:3344 hrs ago1735639293IN
0x827CE7E1...0ED93537f
0.202 S0.000397371.1
Complete Quest20428522024-12-31 0:12:592 days ago1735603979IN
0x827CE7E1...0ED93537f
0.202 S0.000401391.1
Complete Quest20227712024-12-30 19:07:282 days ago1735585648IN
0x827CE7E1...0ED93537f
0.202 S0.00043721.1
Complete Quest20224842024-12-30 19:02:392 days ago1735585359IN
0x827CE7E1...0ED93537f
0.202 S0.000441171.11
Complete Quest20222592024-12-30 18:58:422 days ago1735585122IN
0x827CE7E1...0ED93537f
0.202 S0.00043721.1
Complete Quest20192262024-12-30 18:08:242 days ago1735582104IN
0x827CE7E1...0ED93537f
0.202 S0.00044411.17
Complete Quest20175252024-12-30 17:44:132 days ago1735580653IN
0x827CE7E1...0ED93537f
0.202 S0.000416151.1
Complete Quest20173652024-12-30 17:42:052 days ago1735580525IN
0x827CE7E1...0ED93537f
0.202 S0.000397381.1
Complete Quest19807392024-12-30 10:44:062 days ago1735555446IN
0x827CE7E1...0ED93537f
0.202 S0.00039741.1
Complete Quest19767242024-12-30 9:48:212 days ago1735552101IN
0x827CE7E1...0ED93537f
0.202 S0.000633871.67
Complete Quest19676832024-12-30 7:27:372 days ago1735543657IN
0x827CE7E1...0ED93537f
0.202 S0.000379561
Complete Quest19662352024-12-30 7:04:032 days ago1735542243IN
0x827CE7E1...0ED93537f
0.202 S0.000397391.1
Complete Quest19631152024-12-30 6:10:193 days ago1735539019IN
0x827CE7E1...0ED93537f
0.202 S0.000501041.32
Complete Quest19621782024-12-30 5:47:583 days ago1735537678IN
0x827CE7E1...0ED93537f
0.202 S0.000459271.21
Complete Quest19590732024-12-30 4:44:443 days ago1735533884IN
0x827CE7E1...0ED93537f
0.202 S0.000397391.1
Complete Quest19553172024-12-30 3:34:033 days ago1735529643IN
0x827CE7E1...0ED93537f
0.202 S0.00042511.12
Complete Quest19548372024-12-30 3:25:243 days ago1735529124IN
0x827CE7E1...0ED93537f
0.202 S0.000455471.2
Complete Quest19308812024-12-29 20:16:503 days ago1735503410IN
0x827CE7E1...0ED93537f
0.202 S0.000421311.11
Complete Quest19275282024-12-29 19:12:433 days ago1735499563IN
0x827CE7E1...0ED93537f
0.202 S0.000417491.1
Complete Quest19222072024-12-29 17:46:373 days ago1735494397IN
0x827CE7E1...0ED93537f
0.202 S0.000421331.11
Complete Quest19218272024-12-29 17:40:393 days ago1735494039IN
0x827CE7E1...0ED93537f
0.202 S0.000421331.11
Complete Quest19099572024-12-29 15:07:173 days ago1735484837IN
0x827CE7E1...0ED93537f
0.202 S0.000993642.5
Complete Quest18873332024-12-29 8:29:493 days ago1735460989IN
0x827CE7E1...0ED93537f
0.202 S0.001670074.4
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
21677672025-01-01 14:35:4015 hrs ago1735742140
0x827CE7E1...0ED93537f
0.002 S
21677672025-01-01 14:35:4015 hrs ago1735742140
0x827CE7E1...0ED93537f
0.2 S
20921102024-12-31 15:48:2238 hrs ago1735660102
0x827CE7E1...0ED93537f
0.002 S
20921102024-12-31 15:48:2238 hrs ago1735660102
0x827CE7E1...0ED93537f
0.2 S
20715152024-12-31 10:01:3344 hrs ago1735639293
0x827CE7E1...0ED93537f
0.002 S
20715152024-12-31 10:01:3344 hrs ago1735639293
0x827CE7E1...0ED93537f
0.2 S
20428522024-12-31 0:12:592 days ago1735603979
0x827CE7E1...0ED93537f
0.002 S
20428522024-12-31 0:12:592 days ago1735603979
0x827CE7E1...0ED93537f
0.2 S
20227712024-12-30 19:07:282 days ago1735585648
0x827CE7E1...0ED93537f
0.022 S
20227712024-12-30 19:07:282 days ago1735585648
0x827CE7E1...0ED93537f
0.04 S
20227712024-12-30 19:07:282 days ago1735585648
0x827CE7E1...0ED93537f
0.14 S
20224842024-12-30 19:02:392 days ago1735585359
0x827CE7E1...0ED93537f
0.022 S
20224842024-12-30 19:02:392 days ago1735585359
0x827CE7E1...0ED93537f
0.04 S
20224842024-12-30 19:02:392 days ago1735585359
0x827CE7E1...0ED93537f
0.14 S
20222592024-12-30 18:58:422 days ago1735585122
0x827CE7E1...0ED93537f
0.022 S
20222592024-12-30 18:58:422 days ago1735585122
0x827CE7E1...0ED93537f
0.04 S
20222592024-12-30 18:58:422 days ago1735585122
0x827CE7E1...0ED93537f
0.14 S
20192262024-12-30 18:08:242 days ago1735582104
0x827CE7E1...0ED93537f
0.002 S
20192262024-12-30 18:08:242 days ago1735582104
0x827CE7E1...0ED93537f
0.2 S
20175252024-12-30 17:44:132 days ago1735580653
0x827CE7E1...0ED93537f
0.022 S
20175252024-12-30 17:44:132 days ago1735580653
0x827CE7E1...0ED93537f
0.04 S
20175252024-12-30 17:44:132 days ago1735580653
0x827CE7E1...0ED93537f
0.14 S
20173652024-12-30 17:42:052 days ago1735580525
0x827CE7E1...0ED93537f
0.002 S
20173652024-12-30 17:42:052 days ago1735580525
0x827CE7E1...0ED93537f
0.2 S
19807392024-12-30 10:44:062 days ago1735555446
0x827CE7E1...0ED93537f
0.002 S
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MicroQuest

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : MicroQuest.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "../MicroUtilityV4.sol";

interface IGENE {
    function mint(
        address _account,
        uint256 _value,
        bytes32 _id,
        uint8 _types,
        string calldata _uri
    ) external returns (uint256);
}

contract MicroQuest is AccessControl, ReentrancyGuard, MicroUtilityV4, EIP712 {
    using SafeMath for uint256;
    using ECDSA for bytes32;

    bytes32 internal constant QUEST_DATA_HASH =
        keccak256(
            "QuestData(bytes32 questId,uint256 nonce,uint256 yield,uint8 types,string tokenURI,address quester,address referral)"
        );

    bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE");
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    bool private _initialized;

    IGENE private gene;

    error PurchaseWrongPrice(uint256 correctPrice);

    error Unauthorized();

    error IsNotSigner();

    error NonceAlreadyUsed();

    event NewGeneMinted(
        address indexed minter,
        address indexed referral,
        uint256 geneId,
        uint8 types,
        bytes32 id,
        uint256 bornTime
    );

    struct QuestData {
        bytes32 questId;
        uint256 nonce;
        uint256 yield;
        uint8 types;
        string tokenURI;
        address quester;
        address referral;
    }

    uint256 private percenPerDiscount = 1000;

    uint256 private percenPerRef = 2000;

    uint256 private feeDenominator = 10000;

    mapping(uint256 => bool) internal nonces;

    constructor() EIP712("MicroQuest", "1") {}

    function init(bytes memory initPayload) external returns (bool) {
        if (_initialized) {
            revert Unauthorized();
        }
        (address _gene, address _owner, address _signer, address _manager) = abi
            .decode(initPayload, (address, address, address, address));
        _setupRole(DEFAULT_ADMIN_ROLE, _owner);
        _setupRole(ADMIN_ROLE, _owner);
        _setupRole(SIGNER_ROLE, _signer);
        _setManager(_manager);
        gene = IGENE(_gene);
        _initialized = true;
        return true;
    }

    function completeQuest(QuestData calldata data, bytes calldata signature)
        external
        payable
        nonReentrant
    {
        _validateSignature(data, signature);

        _payout(data.quester, data.referral);

        uint256 geneId = gene.mint(
            data.quester,
            data.yield,
            data.questId,
            data.types,
            data.tokenURI
        );

        emit NewGeneMinted(
            data.quester,
            data.referral,
            geneId,
            data.types,
            data.questId,
            block.timestamp
        );
    }

    function getInfo()
        external
        view
        returns (
            uint256,
            uint256,
            uint256
        )
    {
        return (percenPerRef, percenPerDiscount, feeDenominator);
    }

    function _payout(address minter, address referral) internal {
        uint256 protocolFee = getMicroFeeWei(uint256(1));

        if (minter == referral) {
            revert Unauthorized();
        }

        if (msg.value < protocolFee) {
            revert PurchaseWrongPrice(protocolFee);
        }

        if (referral == address(0)) {
            _payoutMicroFee(protocolFee);
            _payoutRemainder(minter, msg.value.sub(protocolFee));
        } else {
            uint256 refFee = protocolFee.mul(percenPerRef).div(feeDenominator);
            uint256 discountFee = protocolFee.mul(percenPerDiscount).div(
                feeDenominator
            );
            uint256 treasuryFee = protocolFee.sub(refFee).sub(discountFee);
            _payoutMicroFee(treasuryFee);
            _payoutRemainder(referral, refFee);
            _payoutRemainder(
                minter,
                msg.value.sub(protocolFee).add(discountFee)
            );
        }
    }

    function _validateSignature(
        QuestData calldata data,
        bytes calldata signature
    ) internal {
        address signer = _getSigner(data, signature);
        if (!hasRole(SIGNER_ROLE, signer)) {
            revert IsNotSigner();
        }
        if (nonces[data.nonce]) {
            revert NonceAlreadyUsed();
        }
        nonces[data.nonce] = true;
    }

    function _getSigner(QuestData calldata data, bytes calldata sig)
        internal
        view
        returns (address)
    {
        bytes32 digest = _computeDigest(data);
        return digest.recover(sig);
    }

    function _computeDigest(QuestData calldata data)
        internal
        view
        returns (bytes32)
    {
        return _hashTypedDataV4(keccak256(_getQuestHash(data)));
    }

    function _getQuestHash(QuestData calldata data)
        internal
        pure
        returns (bytes memory)
    {
        return
            abi.encode(
                QUEST_DATA_HASH,
                data.questId,
                data.nonce,
                data.yield,
                data.types,
                _encodeString(data.tokenURI),
                data.quester,
                data.referral
            );
    }

    function _encodeString(string calldata _string) internal pure returns (bytes32) {
        return keccak256(bytes(_string));
    }

    function editManager(address _manager) external onlyRole(ADMIN_ROLE) {
        _setManager(_manager);
    }

    function editGENE(address _gene) external onlyRole(ADMIN_ROLE) {
        gene = IGENE(_gene);
    }

    function editInfo(uint256 _percenPerRef, uint256 _percenPerDiscount)
        external
        onlyRole(ADMIN_ROLE)
    {
        percenPerRef = _percenPerRef;
        percenPerDiscount = _percenPerDiscount;
    }
}

File 2 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

/**
 * @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:
 *
 * ```
 * 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}:
 *
 * ```
 * 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.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @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.
     *
     * _Available since v3.1._
     */
    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, an admin role
     * bearer except when using {_setupRole}.
     */
    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 Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @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 override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @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 override returns (bytes32) {
        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.
     */
    function grantRole(bytes32 role, address account) public virtual override 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.
     */
    function revokeRole(bytes32 role, address account) public virtual override 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 granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

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

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 4 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 5 of 13 : draft-EIP712.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ECDSA.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].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // 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 _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @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) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, 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);
    }
}

File 6 of 13 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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 {
    /**
     * @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.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return recover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return recover(hash, r, vs);
        } else {
            revert("ECDSA: invalid signature length");
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} 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.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return recover(hash, v, r, s);
    }

    /**
     * @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) {
        // 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 (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): 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.
        require(
            uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
            "ECDSA: invalid signature 's' value"
        );
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @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) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @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) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 7 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 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);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 8 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * 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[EIP 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);
}

File 9 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 10 of 13 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 11 of 13 : IMicroManager.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.5.0;

interface IMicroManager {
    function microBridge(address _address) external view returns (bool);

    function treasuryAddress() external view returns (address);

    function microProtocolFee() external view returns (uint256);

    function oracleAddress() external view returns (address);
}

File 12 of 13 : IPriceOracle.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface IPriceOracle {
    function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount);
}

File 13 of 13 : MicroUtilityV4.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {IPriceOracle} from "./interfaces/IPriceOracle.sol";
import {IMicroManager} from "./interfaces/IMicroManager.sol";

error PaymentFailed();

contract MicroUtilityV4 {
    using SafeMath for uint256;
    IMicroManager public microManager;
    uint256 private constant STATIC_GAS_LIMIT = 210_000;

    event FeePayout(
        uint256 MicroMintFeeWei,
        address MicroFeeRecipient,
        bool success
    );

    /**
     * PUBLIC FUNCTIONS
     * state changing
     */

    function getMicroFeeWei(uint256 quantity) public view returns (uint256) {
        if (quantity == 0) {
            return 0;
        }
        return
            IPriceOracle(microManager.oracleAddress()).convertUsdToWei(
                microManager.microProtocolFee().mul(quantity)
            );
    }

    function _payoutMicroFee(uint256 microProtocolFee) internal {
        address treasury = microManager.treasuryAddress();
        _payoutRemainder(treasury, microProtocolFee);
        emit FeePayout(microProtocolFee, treasury, true);
    }

    function _setManager(address _manager) internal {
        microManager = IMicroManager(_manager);
    }

    function _payoutRemainder(address recipient, uint256 value) internal {
        if (value > 0) {
            (bool success, ) = payable(recipient).call{
                value: value,
                gas: gasleft() > STATIC_GAS_LIMIT ? STATIC_GAS_LIMIT : gasleft()
            }("");
            if (!success) {
                revert PaymentFailed();
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"IsNotSigner","type":"error"},{"inputs":[],"name":"NonceAlreadyUsed","type":"error"},{"inputs":[],"name":"PaymentFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"correctPrice","type":"uint256"}],"name":"PurchaseWrongPrice","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"MicroMintFeeWei","type":"uint256"},{"indexed":false,"internalType":"address","name":"MicroFeeRecipient","type":"address"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"}],"name":"FeePayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"referral","type":"address"},{"indexed":false,"internalType":"uint256","name":"geneId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"types","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"bornTime","type":"uint256"}],"name":"NewGeneMinted","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"},{"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":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"questId","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"yield","type":"uint256"},{"internalType":"uint8","name":"types","type":"uint8"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"address","name":"quester","type":"address"},{"internalType":"address","name":"referral","type":"address"}],"internalType":"struct MicroQuest.QuestData","name":"data","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"completeQuest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_gene","type":"address"}],"name":"editGENE","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percenPerRef","type":"uint256"},{"internalType":"uint256","name":"_percenPerDiscount","type":"uint256"}],"name":"editInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"name":"editManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"getMicroFeeWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"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":"bytes","name":"initPayload","type":"bytes"}],"name":"init","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"microManager","outputs":[{"internalType":"contract IMicroManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

6101206040526103e86004556107d060055561271060065534801561002357600080fd5b50604080518082018252600a815269135a58dc9bd45d595cdd60b21b6020808301918252835180850185526001808252603160f81b9183019190915280559151902060c08181527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660e08190524660a081815286517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818801819052818901969096526060810193909352608080840192909252308382015286518084039091018152919092019094528351939092019290922090526101005260805160a05160c05160e05161010051611a5e6101416000396000611444015260006114930152600061146e015260006113f30152600061141b0152611a5e6000f3fe6080604052600436106100fe5760003560e01c8063616985ed11610095578063a1ebf35d11610064578063a1ebf35d146102e3578063a217fddf14610317578063afdd34971461032c578063d4497b5a1461034c578063d547741f1461035f57600080fd5b8063616985ed1461026157806375b238fc1461028157806387031fe5146102a357806391d14854146102c357600080fd5b80632f2ff15d116100d15780632f2ff15d146101d057806336568abe146101f05780634ddf47d4146102105780635a9b0b891461023057600080fd5b806301ffc9a7146101035780630e21ea0614610138578063248a9ca31461017057806325e8993d146101ae575b600080fd5b34801561010f57600080fd5b5061012361011e3660046114e1565b61037f565b60405190151581526020015b60405180910390f35b34801561014457600080fd5b50600254610158906001600160a01b031681565b6040516001600160a01b03909116815260200161012f565b34801561017c57600080fd5b506101a061018b36600461150b565b60009081526020819052604090206001015490565b60405190815260200161012f565b3480156101ba57600080fd5b506101ce6101c9366004611524565b6103b6565b005b3480156101dc57600080fd5b506101ce6101eb36600461155e565b6103db565b3480156101fc57600080fd5b506101ce61020b36600461155e565b610406565b34801561021c57600080fd5b5061012361022b3660046115a4565b610489565b34801561023c57600080fd5b506005546004546006546040805193845260208401929092529082015260600161012f565b34801561026d57600080fd5b506101a061027c36600461150b565b61056f565b34801561028d57600080fd5b506101a0600080516020611a0983398151915281565b3480156102af57600080fd5b506101ce6102be366004611655565b6106e6565b3480156102cf57600080fd5b506101236102de36600461155e565b610708565b3480156102ef57600080fd5b506101a07fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561032357600080fd5b506101a0600081565b34801561033857600080fd5b506101ce610347366004611655565b610731565b6101ce61035a366004611672565b61076d565b34801561036b57600080fd5b506101ce61037a36600461155e565b61093b565b60006001600160e01b03198216637965db0b60e01b14806103b057506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020611a098339815191526103cf8133610961565b50600591909155600455565b6000828152602081905260409020600101546103f78133610961565b61040183836109c5565b505050565b6001600160a01b038116331461047b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104858282610a49565b5050565b600254600090600160a01b900460ff16156104b6576040516282b42960e81b815260040160405180910390fd5b600080600080858060200190518101906104d09190611711565b93509350935093506104e56000801b84610aae565b6104fd600080516020611a0983398151915284610aae565b6105277fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7083610aae565b61053081610ab8565b5050600380546001600160a01b039093166001600160a01b03199093169290921790915550506002805460ff60a01b1916600160a01b17905550600190565b60008160000361058157506000919050565b600260009054906101000a90046001600160a01b03166001600160a01b031663a89ae4ba6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f89190611770565b6001600160a01b031663f5d7816161068784600260009054906101000a90046001600160a01b03166001600160a01b0316630c1119bb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561065d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610681919061178d565b90610ada565b6040518263ffffffff1660e01b81526004016106a591815260200190565b602060405180830381865afa1580156106c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b0919061178d565b600080516020611a098339815191526106ff8133610961565b61048582610ab8565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611a0983398151915261074a8133610961565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154036107bf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610472565b60026001556107cf838383610aed565b6107f76107e260c0850160a08601611655565b6107f260e0860160c08701611655565b610b9c565b6003546000906001600160a01b0316634076da8b61081b60c0870160a08801611655565b6040870135873561083260808a0160608b016117a6565b61083f60808b018b6117c9565b6040518763ffffffff1660e01b815260040161086096959493929190611817565b6020604051808303816000875af115801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a3919061178d565b90506108b560e0850160c08601611655565b6001600160a01b03166108ce60c0860160a08701611655565b6001600160a01b03167fc0b4e5805785944dd77b7852122289b391e6fb22982f97232992c16ac0ac2aea836109096080890160608a016117a6565b6040805192835260ff909116602083015288359082015242606082015260800160405180910390a35050600180555050565b6000828152602081905260409020600101546109578133610961565b6104018383610a49565b61096b8282610708565b61048557610983816001600160a01b03166014610cb8565b61098e836020610cb8565b60405160200161099f92919061189d565b60408051601f198184030181529082905262461bcd60e51b825261047291600401611912565b6109cf8282610708565b610485576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a053390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610a538282610708565b15610485576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61048582826109c5565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ae6828461195b565b9392505050565b6000610afa848484610e54565b9050610b267fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082610708565b610b4357604051632c2b07ef60e01b815260040160405180910390fd5b60208085013560009081526007909152604090205460ff1615610b7857604051623f613760e71b815260040160405180910390fd5b5050506020908101356000908152600790915260409020805460ff19166001179055565b6000610ba8600161056f565b9050816001600160a01b0316836001600160a01b031603610bdb576040516282b42960e81b815260040160405180910390fd5b80341015610bff5760405163c5a8df2f60e01b815260048101829052602401610472565b6001600160a01b038216610c2957610c1681610ead565b61040183610c243484610f73565b610f7f565b6000610c4c600654610c4660055485610ada90919063ffffffff16565b9061100e565b90506000610c6b600654610c4660045486610ada90919063ffffffff16565b90506000610c8382610c7d8686610f73565b90610f73565b9050610c8e81610ead565b610c988584610f7f565b610cb086610c2484610caa3489610f73565b9061101a565b505050505050565b60606000610cc783600261195b565b610cd290600261197a565b67ffffffffffffffff811115610cea57610cea61158e565b6040519080825280601f01601f191660200182016040528015610d14576020820181803683370190505b509050600360fc1b81600081518110610d2f57610d2f611992565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610d5e57610d5e611992565b60200101906001600160f81b031916908160001a9053506000610d8284600261195b565b610d8d90600161197a565b90505b6001811115610e05576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610dc157610dc1611992565b1a60f81b828281518110610dd757610dd7611992565b60200101906001600160f81b031916908160001a90535060049490941c93610dfe816119a8565b9050610d90565b508315610ae65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610472565b600080610e6085611026565b9050610ea484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506110409050565b95945050505050565b6002546040805163c5f956af60e01b815290516000926001600160a01b03169163c5f956af9160048083019260209291908290030181865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b9190611770565b9050610f278183610f7f565b604080518381526001600160a01b038316602082015260018183015290517f7d91e6735310f2a10253c2b777a07cdd5bce000456de934af23dfc9e4aea7f879181900360600190a15050565b6000610ae682846119bf565b8015610485576000826001600160a01b031682620334505a11610fa2575a610fa7565b620334505b6040519091906000818181858888f193505050503d8060008114610fe7576040519150601f19603f3d011682016040523d82523d6000602084013e610fec565b606091505b5050905080610401576040516307a4ced160e51b815260040160405180910390fd5b6000610ae682846119d6565b6000610ae6828461197a565b60006103b0611034836110e2565b805190602001206111b5565b600081516041036110735760208201516040830151606084015160001a61106986828585611203565b93505050506103b0565b815160400361109a57602082015160408301516110918583836113a3565b925050506103b0565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610472565b60607fc150f2730550f0f1a39ef6c1e20773b3e00ba846692524a9b8b2657b1d5166d9823560208401356040850135611120608087018787016117a6565b61113561113060808901896117c9565b6113cd565b61114560c0890160a08a01611655565b61115560e08a0160c08b01611655565b6040805160208101999099528801969096526060870194909452608086019290925260ff1660a085015260c08401526001600160a01b0390811660e084015216610100820152610120016040516020818303038152906040529050919050565b60006103b06111c26113ef565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156112805760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610472565b8360ff16601b148061129557508360ff16601c145b6112ec5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610472565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611340573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ea45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610472565b60006001600160ff1b03821660ff83901c601b016113c386828785611203565b9695505050505050565b600082826040516113df9291906119f8565b6040518091039020905092915050565b60007f0000000000000000000000000000000000000000000000000000000000000000460361143d57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000602082840312156114f357600080fd5b81356001600160e01b031981168114610ae657600080fd5b60006020828403121561151d57600080fd5b5035919050565b6000806040838503121561153757600080fd5b50508035926020909101359150565b6001600160a01b038116811461155b57600080fd5b50565b6000806040838503121561157157600080fd5b82359150602083013561158381611546565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156115b657600080fd5b813567ffffffffffffffff808211156115ce57600080fd5b818401915084601f8301126115e257600080fd5b8135818111156115f4576115f461158e565b604051601f8201601f19908116603f0116810190838211818310171561161c5761161c61158e565b8160405282815287602084870101111561163557600080fd5b826020860160208301376000928101602001929092525095945050505050565b60006020828403121561166757600080fd5b8135610ae681611546565b60008060006040848603121561168757600080fd5b833567ffffffffffffffff8082111561169f57600080fd5b9085019060e082880312156116b357600080fd5b909350602085013590808211156116c957600080fd5b818601915086601f8301126116dd57600080fd5b8135818111156116ec57600080fd5b8760208285010111156116fe57600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561172757600080fd5b845161173281611546565b602086015190945061174381611546565b604086015190935061175481611546565b606086015190925061176581611546565b939692955090935050565b60006020828403121561178257600080fd5b8151610ae681611546565b60006020828403121561179f57600080fd5b5051919050565b6000602082840312156117b857600080fd5b813560ff81168114610ae657600080fd5b6000808335601e198436030181126117e057600080fd5b83018035915067ffffffffffffffff8211156117fb57600080fd5b60200191503681900382131561181057600080fd5b9250929050565b60018060a01b038716815285602082015284604082015260ff8416606082015260a060808201528160a0820152818360c0830137600081830160c090810191909152601f909201601f1916010195945050505050565b60005b83811015611888578181015183820152602001611870565b83811115611897576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118d581601785016020880161186d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161190681602884016020880161186d565b01602801949350505050565b602081526000825180602084015261193181604085016020870161186d565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561197557611975611945565b500290565b6000821982111561198d5761198d611945565b500190565b634e487b7160e01b600052603260045260246000fd5b6000816119b7576119b7611945565b506000190190565b6000828210156119d1576119d1611945565b500390565b6000826119f357634e487b7160e01b600052601260045260246000fd5b500490565b818382376000910190815291905056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122080d3f8d4ff39072883d6abc670f091f25a1ed331c89f47b5ab59b6c766dbd3a164736f6c634300080d0033

Deployed Bytecode

0x6080604052600436106100fe5760003560e01c8063616985ed11610095578063a1ebf35d11610064578063a1ebf35d146102e3578063a217fddf14610317578063afdd34971461032c578063d4497b5a1461034c578063d547741f1461035f57600080fd5b8063616985ed1461026157806375b238fc1461028157806387031fe5146102a357806391d14854146102c357600080fd5b80632f2ff15d116100d15780632f2ff15d146101d057806336568abe146101f05780634ddf47d4146102105780635a9b0b891461023057600080fd5b806301ffc9a7146101035780630e21ea0614610138578063248a9ca31461017057806325e8993d146101ae575b600080fd5b34801561010f57600080fd5b5061012361011e3660046114e1565b61037f565b60405190151581526020015b60405180910390f35b34801561014457600080fd5b50600254610158906001600160a01b031681565b6040516001600160a01b03909116815260200161012f565b34801561017c57600080fd5b506101a061018b36600461150b565b60009081526020819052604090206001015490565b60405190815260200161012f565b3480156101ba57600080fd5b506101ce6101c9366004611524565b6103b6565b005b3480156101dc57600080fd5b506101ce6101eb36600461155e565b6103db565b3480156101fc57600080fd5b506101ce61020b36600461155e565b610406565b34801561021c57600080fd5b5061012361022b3660046115a4565b610489565b34801561023c57600080fd5b506005546004546006546040805193845260208401929092529082015260600161012f565b34801561026d57600080fd5b506101a061027c36600461150b565b61056f565b34801561028d57600080fd5b506101a0600080516020611a0983398151915281565b3480156102af57600080fd5b506101ce6102be366004611655565b6106e6565b3480156102cf57600080fd5b506101236102de36600461155e565b610708565b3480156102ef57600080fd5b506101a07fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561032357600080fd5b506101a0600081565b34801561033857600080fd5b506101ce610347366004611655565b610731565b6101ce61035a366004611672565b61076d565b34801561036b57600080fd5b506101ce61037a36600461155e565b61093b565b60006001600160e01b03198216637965db0b60e01b14806103b057506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020611a098339815191526103cf8133610961565b50600591909155600455565b6000828152602081905260409020600101546103f78133610961565b61040183836109c5565b505050565b6001600160a01b038116331461047b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104858282610a49565b5050565b600254600090600160a01b900460ff16156104b6576040516282b42960e81b815260040160405180910390fd5b600080600080858060200190518101906104d09190611711565b93509350935093506104e56000801b84610aae565b6104fd600080516020611a0983398151915284610aae565b6105277fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7083610aae565b61053081610ab8565b5050600380546001600160a01b039093166001600160a01b03199093169290921790915550506002805460ff60a01b1916600160a01b17905550600190565b60008160000361058157506000919050565b600260009054906101000a90046001600160a01b03166001600160a01b031663a89ae4ba6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f89190611770565b6001600160a01b031663f5d7816161068784600260009054906101000a90046001600160a01b03166001600160a01b0316630c1119bb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561065d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610681919061178d565b90610ada565b6040518263ffffffff1660e01b81526004016106a591815260200190565b602060405180830381865afa1580156106c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b0919061178d565b600080516020611a098339815191526106ff8133610961565b61048582610ab8565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611a0983398151915261074a8133610961565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154036107bf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610472565b60026001556107cf838383610aed565b6107f76107e260c0850160a08601611655565b6107f260e0860160c08701611655565b610b9c565b6003546000906001600160a01b0316634076da8b61081b60c0870160a08801611655565b6040870135873561083260808a0160608b016117a6565b61083f60808b018b6117c9565b6040518763ffffffff1660e01b815260040161086096959493929190611817565b6020604051808303816000875af115801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a3919061178d565b90506108b560e0850160c08601611655565b6001600160a01b03166108ce60c0860160a08701611655565b6001600160a01b03167fc0b4e5805785944dd77b7852122289b391e6fb22982f97232992c16ac0ac2aea836109096080890160608a016117a6565b6040805192835260ff909116602083015288359082015242606082015260800160405180910390a35050600180555050565b6000828152602081905260409020600101546109578133610961565b6104018383610a49565b61096b8282610708565b61048557610983816001600160a01b03166014610cb8565b61098e836020610cb8565b60405160200161099f92919061189d565b60408051601f198184030181529082905262461bcd60e51b825261047291600401611912565b6109cf8282610708565b610485576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a053390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610a538282610708565b15610485576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61048582826109c5565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ae6828461195b565b9392505050565b6000610afa848484610e54565b9050610b267fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7082610708565b610b4357604051632c2b07ef60e01b815260040160405180910390fd5b60208085013560009081526007909152604090205460ff1615610b7857604051623f613760e71b815260040160405180910390fd5b5050506020908101356000908152600790915260409020805460ff19166001179055565b6000610ba8600161056f565b9050816001600160a01b0316836001600160a01b031603610bdb576040516282b42960e81b815260040160405180910390fd5b80341015610bff5760405163c5a8df2f60e01b815260048101829052602401610472565b6001600160a01b038216610c2957610c1681610ead565b61040183610c243484610f73565b610f7f565b6000610c4c600654610c4660055485610ada90919063ffffffff16565b9061100e565b90506000610c6b600654610c4660045486610ada90919063ffffffff16565b90506000610c8382610c7d8686610f73565b90610f73565b9050610c8e81610ead565b610c988584610f7f565b610cb086610c2484610caa3489610f73565b9061101a565b505050505050565b60606000610cc783600261195b565b610cd290600261197a565b67ffffffffffffffff811115610cea57610cea61158e565b6040519080825280601f01601f191660200182016040528015610d14576020820181803683370190505b509050600360fc1b81600081518110610d2f57610d2f611992565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610d5e57610d5e611992565b60200101906001600160f81b031916908160001a9053506000610d8284600261195b565b610d8d90600161197a565b90505b6001811115610e05576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610dc157610dc1611992565b1a60f81b828281518110610dd757610dd7611992565b60200101906001600160f81b031916908160001a90535060049490941c93610dfe816119a8565b9050610d90565b508315610ae65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610472565b600080610e6085611026565b9050610ea484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506110409050565b95945050505050565b6002546040805163c5f956af60e01b815290516000926001600160a01b03169163c5f956af9160048083019260209291908290030181865afa158015610ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b9190611770565b9050610f278183610f7f565b604080518381526001600160a01b038316602082015260018183015290517f7d91e6735310f2a10253c2b777a07cdd5bce000456de934af23dfc9e4aea7f879181900360600190a15050565b6000610ae682846119bf565b8015610485576000826001600160a01b031682620334505a11610fa2575a610fa7565b620334505b6040519091906000818181858888f193505050503d8060008114610fe7576040519150601f19603f3d011682016040523d82523d6000602084013e610fec565b606091505b5050905080610401576040516307a4ced160e51b815260040160405180910390fd5b6000610ae682846119d6565b6000610ae6828461197a565b60006103b0611034836110e2565b805190602001206111b5565b600081516041036110735760208201516040830151606084015160001a61106986828585611203565b93505050506103b0565b815160400361109a57602082015160408301516110918583836113a3565b925050506103b0565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610472565b60607fc150f2730550f0f1a39ef6c1e20773b3e00ba846692524a9b8b2657b1d5166d9823560208401356040850135611120608087018787016117a6565b61113561113060808901896117c9565b6113cd565b61114560c0890160a08a01611655565b61115560e08a0160c08b01611655565b6040805160208101999099528801969096526060870194909452608086019290925260ff1660a085015260c08401526001600160a01b0390811660e084015216610100820152610120016040516020818303038152906040529050919050565b60006103b06111c26113ef565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156112805760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610472565b8360ff16601b148061129557508360ff16601c145b6112ec5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610472565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611340573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ea45760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610472565b60006001600160ff1b03821660ff83901c601b016113c386828785611203565b9695505050505050565b600082826040516113df9291906119f8565b6040518091039020905092915050565b60007f0000000000000000000000000000000000000000000000000000000000000092460361143d57507fe62c0d77cad57194dfd90394291b8125047b4eb76eb1ffa5636dce82ebe444b190565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f03ad13f36b267cc83b802df64baafa87d0900ef83ffaae6f8d5f907f01af576d828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000602082840312156114f357600080fd5b81356001600160e01b031981168114610ae657600080fd5b60006020828403121561151d57600080fd5b5035919050565b6000806040838503121561153757600080fd5b50508035926020909101359150565b6001600160a01b038116811461155b57600080fd5b50565b6000806040838503121561157157600080fd5b82359150602083013561158381611546565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156115b657600080fd5b813567ffffffffffffffff808211156115ce57600080fd5b818401915084601f8301126115e257600080fd5b8135818111156115f4576115f461158e565b604051601f8201601f19908116603f0116810190838211818310171561161c5761161c61158e565b8160405282815287602084870101111561163557600080fd5b826020860160208301376000928101602001929092525095945050505050565b60006020828403121561166757600080fd5b8135610ae681611546565b60008060006040848603121561168757600080fd5b833567ffffffffffffffff8082111561169f57600080fd5b9085019060e082880312156116b357600080fd5b909350602085013590808211156116c957600080fd5b818601915086601f8301126116dd57600080fd5b8135818111156116ec57600080fd5b8760208285010111156116fe57600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561172757600080fd5b845161173281611546565b602086015190945061174381611546565b604086015190935061175481611546565b606086015190925061176581611546565b939692955090935050565b60006020828403121561178257600080fd5b8151610ae681611546565b60006020828403121561179f57600080fd5b5051919050565b6000602082840312156117b857600080fd5b813560ff81168114610ae657600080fd5b6000808335601e198436030181126117e057600080fd5b83018035915067ffffffffffffffff8211156117fb57600080fd5b60200191503681900382131561181057600080fd5b9250929050565b60018060a01b038716815285602082015284604082015260ff8416606082015260a060808201528160a0820152818360c0830137600081830160c090810191909152601f909201601f1916010195945050505050565b60005b83811015611888578181015183820152602001611870565b83811115611897576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516118d581601785016020880161186d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161190681602884016020880161186d565b01602801949350505050565b602081526000825180602084015261193181604085016020870161186d565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561197557611975611945565b500290565b6000821982111561198d5761198d611945565b500190565b634e487b7160e01b600052603260045260246000fd5b6000816119b7576119b7611945565b506000190190565b6000828210156119d1576119d1611945565b500390565b6000826119f357634e487b7160e01b600052601260045260246000fd5b500490565b818382376000910190815291905056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122080d3f8d4ff39072883d6abc670f091f25a1ed331c89f47b5ab59b6c766dbd3a164736f6c634300080d0033

Block Transaction 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
[ 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.