S Price: $0.854514 (-0.35%)

Contract

0x2F6E3Aa5A0EE65F9fD25D5248699225f733ade2f

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ProjectsRegistrar

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
File 1 of 17 : ProjectsRegistrar.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {IGasMonetization} from "./interfaces/IGasMonetization.sol";

/**
 * @title Projects Registrar Contract for GasMonetization project.
 * @custom:security-contact [email protected]
 */
contract ProjectsRegistrar is AccessControlUpgradeable, PausableUpgradeable, UUPSUpgradeable {
    using Address for address payable;

    /**
     * @dev Role for the moderator approving new projects.
     */
    bytes32 public constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE");

    /**
     * @dev Role for withdrawing collected fees.
     */
    bytes32 public constant FEE_COLLECTOR_ROLE = keccak256("FEE_COLLECTOR_ROLE");

    /**
     * @dev Role for setting fee and refund rate.
     */
    bytes32 public constant FEE_SETTER_ROLE = keccak256("FEE_SETTER_ROLE");

    /**
     * @dev Role for setting the pause.
     */
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    /**
     * @dev GasMonetization contract.
     */
    IGasMonetization public gasMonetization;

    /**
     * @dev Threshold for approval of new projects.
     */
    uint256 public approvalThreshold;

    /**
     * @dev Fee for registering new projects.
     */
    uint256 public registrationFee;

    /**
     * @dev Registration fee refund rate.
     */
    uint256 public registrationFeeRefundRate;

    /**
     * @notice Registration is a struct for project registrations.
     */
    struct Registration {
        address owner; // address of the project owner
        address rewardsRecipient; // address of the rewards recipient
        string metadataUri; // metadata URI of the project
        string disputeContact; // dispute contact of the project
        address[] contracts; // addresses of the project contracts
        uint256 paidFee; // amount of the paid fee at the time of registration
        uint256 votedFor; // Amount of positive votes
        address[] voted; // Moderators who already voted.
    }

    /**
     * @dev New project registrations waiting for approvals.
     */
    mapping(uint256 registrationID => Registration) public registrations;

    /**
     * @dev Last project registration ID.
     */
    uint256 public lastRegistrationID;

    /**
     * @dev Mapping of project ID to dispute contact.
     */
    mapping(uint256 projectID => string) public disputeContacts;

    // Custom Errors
    error ZeroAddress();
    error ThresholdMustBeGreaterThanZero();
    error RefundRateTooHigh(uint256 given, uint256 max);
    error InsufficientRegistrationFee(uint256 given, uint256 required);
    error EmptyMetadataUri();
    error EmptyDisputeContact();
    error ContractAlreadyRegistered(address contractAddress, uint256 projectId);
    error RegistrationAlreadyVoted(uint256 registrationID, address approver);
    error RegistrationNotFound(uint256 registrationID);
    error NotProjectOwner(uint256 projectID, address owner);
    error ProjectNotFound(uint256 projectID);

    event RegistrationCreated(
        uint256 indexed registrationID,
        address indexed owner,
        address rewardsRecipient,
        uint256 paidFee,
        string metadataUri,
        string disputeContact,
        address[] contracts
    );
    event RegistrationVoted(uint256 registrationID, address voter, bool approved);
    event RegistrationResolved(uint256 indexed registrationID, bool approved, uint256 refundedFee);
    event DisputeContactUpdated(uint256 indexed projectID, string newDisputeContact);
    event CollectedFeesWithdrawn(address indexed recipient, uint256 amount);
    event ApprovalThresholdUpdated(uint256 newThreshold);
    event GasMonetizationUpdated(address newGasMonetization);
    event RegistrationFeeUpdated(uint256 newFee);
    event RegistrationFeeRefundRateUpdated(uint256 newRefundRate);

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

    /**
     * @notice Initialize the contract.
     * @param _admin Address of the admin.
     * @param _gasMonetization Address of the GasMonetization contract.
     * @param _approvalThreshold Number of approvals required for project registration.
     * @param _registrationFee Fee for registering a new project.
     * @param _registrationFeeRefundRate Fee refund rate of the register fee.
     */
    function initialize(
        address _admin,
        address _gasMonetization,
        uint256 _approvalThreshold,
        uint256 _registrationFee,
        uint256 _registrationFeeRefundRate
    ) external initializer {
        __AccessControl_init();
        __Pausable_init();
        __UUPSUpgradeable_init();

        if (_gasMonetization == address(0)) {
            revert ZeroAddress();
        }
        if (_approvalThreshold == 0) {
            revert ThresholdMustBeGreaterThanZero();
        }
        if (_registrationFeeRefundRate > 1e18) {
            revert RefundRateTooHigh(_registrationFeeRefundRate, 1e18);
        }

        gasMonetization = IGasMonetization(_gasMonetization);
        approvalThreshold = _approvalThreshold;
        registrationFee = _registrationFee;
        registrationFeeRefundRate = _registrationFeeRefundRate;

        _grantRole(DEFAULT_ADMIN_ROLE, _admin);
    }

    /**
     * @notice Register a new project.
     * @dev This function is called to register a new project.
     * @param owner Address of the project owner.
     * @param rewardsRecipient Address of the rewards recipient.
     * @param metadataUri Metadata URI of the project.
     * @param disputeContact Dispute contact of the project.
     * @param projectContracts Addresses of the project contracts.
     */
    function register(
        address owner,
        address rewardsRecipient,
        string calldata metadataUri,
        string calldata disputeContact,
        address[] calldata projectContracts
    ) external payable {
        if (msg.value != registrationFee) {
            revert InsufficientRegistrationFee(msg.value, registrationFee);
        }

        // make sure the project properties are valid
        if (owner == address(0) || rewardsRecipient == address(0)) {
            revert ZeroAddress();
        }
        if (bytes(metadataUri).length == 0) {
            revert EmptyMetadataUri();
        }
        if (bytes(disputeContact).length == 0) {
            revert EmptyDisputeContact();
        }
        for (uint256 i = 0; i < projectContracts.length; i++) {
            uint256 projectID = gasMonetization.getProjectIdOfContract(projectContracts[i]);
            if (projectID != 0) {
                revert ContractAlreadyRegistered(projectContracts[i], projectID);
            }
        }

        // increment the last registration ID and create a new registration
        lastRegistrationID++;
        registrations[lastRegistrationID].owner = owner;
        registrations[lastRegistrationID].rewardsRecipient = rewardsRecipient;
        registrations[lastRegistrationID].metadataUri = metadataUri;
        registrations[lastRegistrationID].disputeContact = disputeContact;
        registrations[lastRegistrationID].contracts = projectContracts;
        registrations[lastRegistrationID].paidFee = registrationFee;

        emit RegistrationCreated(
            lastRegistrationID,
            owner,
            rewardsRecipient,
            registrationFee,
            metadataUri,
            disputeContact,
            projectContracts
        );
    }

    /**
     * @notice Approve project registration. Only moderators can approve.
     * @dev This function is called by moderators to approve the project registration.
     * @param registrationID ID of the project registration.
     */
    function approveRegistration(uint256 registrationID) external onlyRole(MODERATOR_ROLE) {
        _voteRegistration(registrationID, _msgSender(), true);
    }

    /**
     * @notice Reject project registration. Only moderators can reject.
     * @dev This function is called by moderators to reject the project registration.
     * @param registrationID ID of the project registration.
     */
    function rejectRegistration(uint256 registrationID) external onlyRole(MODERATOR_ROLE) {
        _voteRegistration(registrationID, _msgSender(), false);
    }

    /**
     * @notice Update project dispute contact.
     * @dev This function is called by the project owner to update the dispute contact of the project
     *      and does not require any approval.
     * @param projectID ID of the project.
     * @param newDisputeContact New dispute contact.
     */
    function updateDisputeContact(uint256 projectID, string calldata newDisputeContact) external {
        address sender = _msgSender();
        _validateProjectOwner(projectID, sender);

        if (bytes(newDisputeContact).length == 0) {
            revert EmptyDisputeContact();
        }

        disputeContacts[projectID] = newDisputeContact;
        emit DisputeContactUpdated(projectID, newDisputeContact);
    }

    /**
     * @notice Set approval threshold.
     * @param _approvalThreshold New threshold.
     */
    function setApprovalThreshold(uint256 _approvalThreshold) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_approvalThreshold == 0) {
            revert ThresholdMustBeGreaterThanZero();
        }
        approvalThreshold = _approvalThreshold;
        emit ApprovalThresholdUpdated(_approvalThreshold);
    }

    /**
     * @notice Set register fee.
     * @param _registrationFee New fee.
     */
    function setRegistrationFee(uint256 _registrationFee) external onlyRole(FEE_SETTER_ROLE) {
        registrationFee = _registrationFee;
        emit RegistrationFeeUpdated(_registrationFee);
    }

    /**
     * @notice Set register fee refund rate.
     * @param _registrationFeeRefundRate New refund rate. Must be less than 1e18. 1e18 means 100%.
     */
    function setRegistrationFeeRefundRate(uint256 _registrationFeeRefundRate) external onlyRole(FEE_SETTER_ROLE) {
        if (_registrationFeeRefundRate > 1e18) {
            revert RefundRateTooHigh(_registrationFeeRefundRate, 1e18);
        }
        registrationFeeRefundRate = _registrationFeeRefundRate;
        emit RegistrationFeeRefundRateUpdated(_registrationFeeRefundRate);
    }

    /**
     * @notice Set gas monetization.
     * @param _gasMonetization Address of gas monetization.
     */
    function setGasMonetization(address _gasMonetization) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_gasMonetization == address(0)) {
            revert ZeroAddress();
        }
        gasMonetization = IGasMonetization(_gasMonetization);
        emit GasMonetizationUpdated(_gasMonetization);
    }

    /**
     * @notice Withdraw collected fees.
     * @param recipient Address of recipient.
     * @param amount Amount to be withdrawn.
     */
    function withdrawCollectedFees(address payable recipient, uint256 amount) external onlyRole(FEE_COLLECTOR_ROLE) {
        recipient.sendValue(amount);
        emit CollectedFeesWithdrawn(recipient, amount);
    }

    /**
     * @notice Pause the contract.
     */
    function pause() external onlyRole(PAUSER_ROLE) {
        _pause();
    }

    /**
     * @notice Unpause the contract.
     */
    function unpause() external onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    /**
     * @notice Returns the list of contract addresses for a specific pending registration.
     * @param registrationID The ID of the project registration.
     * @return An array of addresses representing the contracts of the project.
     */
    function registrationContracts(uint256 registrationID) external view returns (address[] memory) {
        return registrations[registrationID].contracts;
    }

    /**
     * @notice Get list of moderators who voted for or against the registration.
     * @param registrationID Registration ID.
     * @return Votes for or against the registration.
     */
    function registrationVoted(uint256 registrationID) external view returns (address[] memory) {
        return registrations[registrationID].voted;
    }

    /**
     * @notice Get the number of votes for the registration.
     * @param registrationID Registration ID.
     * @return Number of approvals for the registration.
     */
    function votedForRegistration(uint256 registrationID) external view returns (uint256) {
        return registrations[registrationID].votedFor;
    }

    /**
     * @notice Get the number of votes against the registration.
     * @param registrationID Registration ID.
     * @return Number of declines for the registration.
     */
    function votedAgainstRegistration(uint256 registrationID) external view returns (uint256) {
        return registrations[registrationID].voted.length - registrations[registrationID].votedFor;
    }

    /**
     * @notice Refill the contract with native tokens.
     */
    function refill() external payable {
        // accept native tokens in case of need to fund the contract
        // this might happen when too many funds are withdrawn and there is not enough native tokens to pay fee refunds
    }

    /**
     * @dev Override the upgrade authorization check to allow upgrades only from the owner.
     */
    // solhint-disable-next-line no-empty-blocks
    function _authorizeUpgrade(address) internal override onlyRole(DEFAULT_ADMIN_ROLE) {}

    /**
     * @notice Vote on project registration.
     * @param registrationID ID of the project registration.
     * @param moderator Address of the moderator.
     * @param approved True if the registration is approved.
     */
    function _voteRegistration(uint256 registrationID, address moderator, bool approved) private {
        Registration memory registration = registrations[registrationID];

        if (registration.owner == address(0)) {
            revert RegistrationNotFound(registrationID);
        }

        // each moderator can approve only once
        uint256 numOfVotes = registration.voted.length;
        for (uint256 i = 0; i < numOfVotes; i++) {
            if (registration.voted[i] == moderator) {
                revert RegistrationAlreadyVoted(registrationID, moderator);
            }
        }
        emit RegistrationVoted(registrationID, moderator, approved);

        uint256 numOfApprovals = registration.votedFor;
        uint256 numOfRejections = numOfVotes - numOfApprovals;
        if (approved) {
            numOfApprovals++;
            // successfully resolve the registration if the approval threshold is reached
            if (numOfApprovals >= approvalThreshold) {
                _acceptRegistration(registrationID, registration);
                return;
            }
        } else {
            numOfRejections++;
            // reject the registration if the rejection threshold is reached
            if (numOfRejections >= approvalThreshold) {
                _rejectRegistration(registrationID);
                return;
            }
        }
        // add the vote
        if (approved) {
            registrations[registrationID].votedFor = numOfApprovals;
        }
        registrations[registrationID].voted.push(moderator);
    }

    /**
     * @notice Accept project registration.
     * @param registrationID ID of the project registration.
     * @param registration Registration data.
     */
    function _acceptRegistration(uint256 registrationID, Registration memory registration) private {
        // delete the registration first to prevent reentrancy
        delete registrations[registrationID];

        // register the project in the GasMonetization contract
        gasMonetization.addProject(
            registration.owner,
            registration.rewardsRecipient,
            registration.metadataUri,
            registration.contracts
        );

        // save the dispute contact
        disputeContacts[gasMonetization.lastProjectId()] = registration.disputeContact;

        // refund the fee to the rewards recipient
        uint256 refundAmount = (registration.paidFee * registrationFeeRefundRate) / 1e18;
        if (refundAmount > 0) {
            payable(registration.rewardsRecipient).sendValue(refundAmount);
        }

        emit RegistrationResolved(registrationID, true, refundAmount);
    }

    /**
     * @notice Reject project registration.
     * @param registrationID ID of the project registration.
     */
    function _rejectRegistration(uint256 registrationID) private {
        // delete the registration first to prevent reentrancy
        delete registrations[registrationID];
        // nothing more to do except emitting the event
        emit RegistrationResolved(registrationID, false, 0);
    }

    /**
     * @notice Validate sender is the project owner.
     * @param projectId ID of the project.
     * @param sender Address of the sender.
     */
    function _validateProjectOwner(uint256 projectId, address sender) private view {
        address owner = gasMonetization.getProjectOwner(projectId);
        if (owner == address(0)) {
            revert ProjectNotFound(projectId);
        }
        if (sender != owner) {
            revert NotProjectOwner(projectId, owner);
        }
    }
}

File 2 of 17 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

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

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;


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

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

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

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

    function __AccessControl_init() internal onlyInitializing {
    }

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

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

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

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

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

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

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

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

        _revokeRole(role, callerConfirmation);
    }

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

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

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

File 3 of 17 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

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

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

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

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

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

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

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

File 4 of 17 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.20;

import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";

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

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

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

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

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

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

    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

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

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

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

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

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

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

File 5 of 17 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";

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

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

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

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

File 6 of 17 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

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

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

File 7 of 17 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Pausable
    struct PausableStorage {
        bool _paused;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;

    function _getPausableStorage() private pure returns (PausableStorage storage $) {
        assembly {
            $.slot := PausableStorageLocation
        }
    }

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        PausableStorage storage $ = _getPausableStorage();
        return $._paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        PausableStorage storage $ = _getPausableStorage();
        $._paused = false;
        emit Unpaused(_msgSender());
    }
}

File 8 of 17 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

File 9 of 17 : draft-IERC1822.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.20;

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

File 10 of 17 : IERC1967.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol)

pragma solidity ^0.8.20;

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

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

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

File 11 of 17 : IBeacon.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.20;

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

File 12 of 17 : ERC1967Utils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (proxy/ERC1967/ERC1967Utils.sol)

pragma solidity ^0.8.21;

import {IBeacon} from "../beacon/IBeacon.sol";
import {IERC1967} from "../../interfaces/IERC1967.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;

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

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

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

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

File 13 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

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

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

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

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

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

File 14 of 17 : Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

pragma solidity ^0.8.20;

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

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

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

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

File 15 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 16 of 17 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

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

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct Int256Slot {
        int256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

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

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

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

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

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

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

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

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

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

File 17 of 17 : IGasMonetization.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;

interface IGasMonetization {
    function addProject(
        address owner,
        address rewardsRecipient,
        string calldata metadataUri,
        address[] calldata projectContracts
    ) external;

    function getProjectIdOfContract(address contractAddress) external view returns (uint256);

    function getProjectOwner(uint256 projectId) external view returns (address);

    function lastProjectId() external view returns (uint256);

    function addProjectContract(uint256 projectId, address contractAddress) external;

    function removeProjectContract(uint256 projectId, address contractAddress) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"projectId","type":"uint256"}],"name":"ContractAlreadyRegistered","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"EmptyDisputeContact","type":"error"},{"inputs":[],"name":"EmptyMetadataUri","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"given","type":"uint256"},{"internalType":"uint256","name":"required","type":"uint256"}],"name":"InsufficientRegistrationFee","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"uint256","name":"projectID","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"NotProjectOwner","type":"error"},{"inputs":[{"internalType":"uint256","name":"projectID","type":"uint256"}],"name":"ProjectNotFound","type":"error"},{"inputs":[{"internalType":"uint256","name":"given","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"RefundRateTooHigh","type":"error"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"},{"internalType":"address","name":"approver","type":"address"}],"name":"RegistrationAlreadyVoted","type":"error"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"RegistrationNotFound","type":"error"},{"inputs":[],"name":"ThresholdMustBeGreaterThanZero","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"ApprovalThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CollectedFeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectID","type":"uint256"},{"indexed":false,"internalType":"string","name":"newDisputeContact","type":"string"}],"name":"DisputeContactUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newGasMonetization","type":"address"}],"name":"GasMonetizationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"registrationID","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"rewardsRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"paidFee","type":"uint256"},{"indexed":false,"internalType":"string","name":"metadataUri","type":"string"},{"indexed":false,"internalType":"string","name":"disputeContact","type":"string"},{"indexed":false,"internalType":"address[]","name":"contracts","type":"address[]"}],"name":"RegistrationCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRefundRate","type":"uint256"}],"name":"RegistrationFeeRefundRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"RegistrationFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"registrationID","type":"uint256"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"},{"indexed":false,"internalType":"uint256","name":"refundedFee","type":"uint256"}],"name":"RegistrationResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"registrationID","type":"uint256"},{"indexed":false,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"RegistrationVoted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_COLLECTOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MODERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvalThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"approveRegistration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectID","type":"uint256"}],"name":"disputeContacts","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasMonetization","outputs":[{"internalType":"contract IGasMonetization","name":"","type":"address"}],"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":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_gasMonetization","type":"address"},{"internalType":"uint256","name":"_approvalThreshold","type":"uint256"},{"internalType":"uint256","name":"_registrationFee","type":"uint256"},{"internalType":"uint256","name":"_registrationFeeRefundRate","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRegistrationID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refill","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"rewardsRecipient","type":"address"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"disputeContact","type":"string"},{"internalType":"address[]","name":"projectContracts","type":"address[]"}],"name":"register","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"registrationContracts","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registrationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registrationFeeRefundRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"registrationVoted","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"registrations","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"rewardsRecipient","type":"address"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"string","name":"disputeContact","type":"string"},{"internalType":"uint256","name":"paidFee","type":"uint256"},{"internalType":"uint256","name":"votedFor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"rejectRegistration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_approvalThreshold","type":"uint256"}],"name":"setApprovalThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gasMonetization","type":"address"}],"name":"setGasMonetization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_registrationFee","type":"uint256"}],"name":"setRegistrationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_registrationFeeRefundRate","type":"uint256"}],"name":"setRegistrationFeeRefundRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectID","type":"uint256"},{"internalType":"string","name":"newDisputeContact","type":"string"}],"name":"updateDisputeContact","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"votedAgainstRegistration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"registrationID","type":"uint256"}],"name":"votedForRegistration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawCollectedFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405230608052348015610013575f5ffd5b5061001c610021565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100715760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051612ba16100f95f395f8181611930015281816119590152611a9a0152612ba15ff3fe608060405260043610610228575f3560e01c8063797669c911610129578063c320c727116100a8578063e93476831161006d578063e934768314610667578063e9b891a21461069a578063ee91ee83146106b9578063ef56f4b3146106ef578063f4ddb5be14610704575f5ffd5b8063c320c727146105b8578063ce8f189b146105d7578063d13f90b4146105f6578063d547741f14610615578063e63ab1e914610634575f5ffd5b8063a0016b8c116100ee578063a0016b8c14610518578063a217fddf14610537578063a5e9cf931461054a578063ac6a326214610569578063ad3cb1cc14610588575f5ffd5b8063797669c91461047e5780637d0eef61146104b15780638456cb59146104c65780638f1ba5db146104da57806391d14854146104f9575f5ffd5b80633f4ba83a116101b5578063538e07591161017a578063538e0759146102ce5780635a70780f146103db5780635c975abb146103fa57806362a2a47c1461041d578063705f1f5c14610450575f5ffd5b80633f4ba83a14610361578063408e2856146103755780634f1ef286146103885780634fa73a801461039b57806352d1902d146103c7575f5ffd5b8063248a9ca3116101fb578063248a9ca3146102d0578063251516b1146102ef5780632f2ff15d1461030e57806336568abe1461032d5780633ac81b991461034c575f5ffd5b806301ffc9a71461022c57806314c44e09146102605780632018b9091461028357806323fafbe8146102af575b5f5ffd5b348015610237575f5ffd5b5061024b6102463660046122e1565b610735565b60405190151581526020015b60405180910390f35b34801561026b575f5ffd5b5061027560025481565b604051908152602001610257565b34801561028e575f5ffd5b506102a261029d366004612308565b61076b565b6040516102579190612362565b3480156102ba575f5ffd5b506102ce6102c9366004612308565b6107d7565b005b3480156102db575f5ffd5b506102756102ea366004612308565b610811565b3480156102fa575f5ffd5b50610275610309366004612308565b610831565b348015610319575f5ffd5b506102ce610328366004612388565b610853565b348015610338575f5ffd5b506102ce610347366004612388565b610875565b348015610357575f5ffd5b5061027560035481565b34801561036c575f5ffd5b506102ce6108ad565b6102ce6103833660046123fa565b6108e2565b6102ce6103963660046124fd565b610bc4565b3480156103a6575f5ffd5b506103ba6103b5366004612308565b610bdf565b60405161025791906125ee565b3480156103d2575f5ffd5b50610275610c76565b3480156103e6575f5ffd5b506102a26103f5366004612308565b610c93565b348015610405575f5ffd5b505f516020612b4c5f395f51905f525460ff1661024b565b348015610428575f5ffd5b506102757f2dca0f5ce7e75a4b43fe2b0d6f5d0b7a2bf92ecf89f8f0aa17b8308b6703882181565b34801561045b575f5ffd5b5061027561046a366004612308565b5f9081526004602052604090206006015490565b348015610489575f5ffd5b506102757f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b3480156104bc575f5ffd5b5061027560015481565b3480156104d1575f5ffd5b506102ce610cfd565b3480156104e5575f5ffd5b506102ce6104f4366004612600565b610d2f565b348015610504575f5ffd5b5061024b610513366004612388565b610db4565b348015610523575f5ffd5b506102ce610532366004612308565b610dea565b348015610542575f5ffd5b506102755f81565b348015610555575f5ffd5b506102ce610564366004612308565b610e51565b348015610574575f5ffd5b506102ce610583366004612647565b610eea565b348015610593575f5ffd5b506103ba604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156105c3575f5ffd5b506102ce6105d2366004612308565b610f6f565b3480156105e2575f5ffd5b506102ce6105f1366004612671565b610fce565b348015610601575f5ffd5b506102ce61061036600461268c565b61104c565b348015610620575f5ffd5b506102ce61062f366004612388565b611220565b34801561063f575f5ffd5b506102757f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b348015610672575f5ffd5b506102757fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f8818206081565b3480156106a5575f5ffd5b506102ce6106b4366004612308565b61123c565b3480156106c4575f5ffd5b505f546106d7906001600160a01b031681565b6040516001600160a01b039091168152602001610257565b3480156106fa575f5ffd5b5061027560055481565b34801561070f575f5ffd5b5061072361071e366004612308565b611271565b604051610257969594939291906126d9565b5f6001600160e01b03198216637965db0b60e01b148061076557506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f818152600460208181526040928390209091018054835181840281018401909452808452606093928301828280156107cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116107ad575b50505050509050919050565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f610801816113be565b61080d823360016113c8565b5050565b5f9081525f516020612b2c5f395f51905f52602052604090206001015490565b5f81815260046020526040812060068101546007909101546107659190612740565b61085c82610811565b610865816113be565b61086f83836117ac565b50505050565b6001600160a01b038116331461089e5760405163334bd91960e11b815260040160405180910390fd5b6108a8828261184d565b505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6108d7816113be565b6108df6118c6565b50565b60025434146109165760025460405163709886f160e01b815234600482015260248101919091526044015b60405180910390fd5b6001600160a01b038816158061093357506001600160a01b038716155b156109515760405163d92e233d60e01b815260040160405180910390fd5b5f8590036109725760405163540462c360e11b815260040160405180910390fd5b5f839003610993576040516306e3be9f60e51b815260040160405180910390fd5b5f5b81811015610a9f575f80546001600160a01b0316635c7449998585858181106109c0576109c0612753565b90506020020160208101906109d59190612671565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610a17573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a3b9190612767565b90508015610a9657838383818110610a5557610a55612753565b9050602002016020810190610a6a9190612671565b60405163a31a45b360e01b81526001600160a01b0390911660048201526024810182905260440161090d565b50600101610995565b5060058054905f610aaf8361277e565b9091555050600580545f9081526004602052604080822080546001600160a01b03808e166001600160a01b031992831617909255845484528284206001018054928d16929091169190911790559154815220600201610b0f868883612819565b506005545f908152600460205260409020600301610b2e848683612819565b506005545f908152600460208190526040909120610b4e9101838361221e565b50600254600580545f90815260046020526040908190208201839055905490516001600160a01b038b16927f9a2a35be308bb80705068989272f6a21b856e34cffbe148759fe18217326c4e991610bb2918c918c908c908c908c908c908c906128fa565b60405180910390a35050505050505050565b610bcc611925565b610bd5826119c9565b61080d82826119d3565b60066020525f908152604090208054610bf790612796565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2390612796565b8015610c6e5780601f10610c4557610100808354040283529160200191610c6e565b820191905f5260205f20905b815481529060010190602001808311610c5157829003601f168201915b505050505081565b5f610c7f611a8f565b505f516020612b0c5f395f51905f5290565b565b5f818152600460209081526040918290206007018054835181840281018401909452808452606093928301828280156107cb57602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116107ad5750505050509050919050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610d27816113be565b6108df611ad8565b33610d3a8482611b20565b5f829003610d5b576040516306e3be9f60e51b815260040160405180910390fd5b5f848152600660205260409020610d73838583612819565b50837faed924a3e9eb951b4a6aed8e85626eb53583e8862528945e7ba6c1a647af5b7d8484604051610da6929190612987565b60405180910390a250505050565b5f9182525f516020612b2c5f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f610df4816113be565b815f03610e1457604051630372105960e61b815260040160405180910390fd5b60018290556040518281527f3105a3dc553e12034caac9827a83c245fe17eef4ee1eedb45238ac7449a5bbec906020015b60405180910390a15050565b7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060610e7b816113be565b670de0b6b3a7640000821115610eb55760405163e0671d3360e01b815260048101839052670de0b6b3a7640000602482015260440161090d565b60038290556040518281527fcc6bc85a9c85d9b8cdf86531486699f5c9eebde2a7e10448a5568e5c507f28eb90602001610e45565b7f2dca0f5ce7e75a4b43fe2b0d6f5d0b7a2bf92ecf89f8f0aa17b8308b67038821610f14816113be565b610f276001600160a01b03841683611bfb565b826001600160a01b03167f7b106be0748dffaea43badf09d726d1536d333bec437aaae8550c7f35d11300783604051610f6291815260200190565b60405180910390a2505050565b7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060610f99816113be565b60028290556040518281527fb120d26fad0e7bd128060711a484693f1283b8143bf94bde9df9b13217aa483690602001610e45565b5f610fd8816113be565b6001600160a01b038216610fff5760405163d92e233d60e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0384169081179091556040519081527f9226af551324226939e6695f1a5c3010b742022723785d31d14f5dcb91c57dfa90602001610e45565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156110905750825b90505f826001600160401b031660011480156110ab5750303b155b9050811580156110b9575080155b156110d75760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561110157845460ff60401b1916600160401b1785555b611109611c95565b611111611c9d565b611119611c95565b6001600160a01b0389166111405760405163d92e233d60e01b815260040160405180910390fd5b875f0361116057604051630372105960e61b815260040160405180910390fd5b670de0b6b3a764000086111561119a5760405163e0671d3360e01b815260048101879052670de0b6b3a7640000602482015260440161090d565b5f80546001600160a01b0319166001600160a01b038b161781556001899055600288905560038790556111cd908b6117ac565b50831561121457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b61122982610811565b611232816113be565b61086f838361184d565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f611266816113be565b61080d82335f6113c8565b60046020525f90815260409020805460018201546002830180546001600160a01b039384169492909316926112a590612796565b80601f01602080910402602001604051908101604052809291908181526020018280546112d190612796565b801561131c5780601f106112f35761010080835404028352916020019161131c565b820191905f5260205f20905b8154815290600101906020018083116112ff57829003601f168201915b50505050509080600301805461133190612796565b80601f016020809104026020016040519081016040528092919081815260200182805461135d90612796565b80156113a85780601f1061137f576101008083540402835291602001916113a8565b820191905f5260205f20905b81548152906001019060200180831161138b57829003601f168201915b5050505050908060050154908060060154905086565b6108df8133611cad565b5f83815260046020908152604080832081516101008101835281546001600160a01b03908116825260018301541693810193909352600281018054919284019161141190612796565b80601f016020809104026020016040519081016040528092919081815260200182805461143d90612796565b80156114885780601f1061145f57610100808354040283529160200191611488565b820191905f5260205f20905b81548152906001019060200180831161146b57829003601f168201915b505050505081526020016003820180546114a190612796565b80601f01602080910402602001604051908101604052809291908181526020018280546114cd90612796565b80156115185780601f106114ef57610100808354040283529160200191611518565b820191905f5260205f20905b8154815290600101906020018083116114fb57829003601f168201915b505050505081526020016004820180548060200260200160405190810160405280929190818152602001828054801561157857602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161155a575b505050505081526020016005820154815260200160068201548152602001600782018054806020026020016040519081016040528092919081815260200182805480156115ec57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116115ce575b5050509190925250508151919250506001600160a01b0316611624576040516340573cb560e11b81526004810185905260240161090d565b60e0810151515f5b8181101561169d57846001600160a01b03168360e00151828151811061165457611654612753565b60200260200101516001600160a01b0316036116955760405163d141599560e01b8152600481018790526001600160a01b038616602482015260440161090d565b60010161162c565b50604080518681526001600160a01b03861660208201528415158183015290517f54df9f13d0fba24181a5d64acb9ef191b5eb43f5629b164d326282d618f3e3449181900360600190a160c08201515f6116f78284612740565b9050841561172d57816117098161277e565b92505060015482106117285761171f8785611ce6565b50505050505050565b61174c565b806117378161277e565b915050600154811061174c5761171f87611ed9565b8415611766575f8781526004602052604090206006018290555b5050505f938452505060046020908152604083206007018054600181018255908452922090910180546001600160a01b0319166001600160a01b03909216919091179055565b5f5f516020612b2c5f395f51905f526117c58484610db4565b611844575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556117fa3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610765565b5f915050610765565b5f5f516020612b2c5f395f51905f526118668484610db4565b15611844575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610765565b6118ce611f85565b5f516020612b4c5f395f51905f52805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806119ab57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661199f5f516020612b0c5f395f51905f52546001600160a01b031690565b6001600160a01b031614155b15610c915760405163703e46dd60e11b815260040160405180910390fd5b5f61080d816113be565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190612767565b60015b611a5557604051634c9c8ce360e01b81526001600160a01b038316600482015260240161090d565b5f516020612b0c5f395f51905f528114611a8557604051632a87526960e21b81526004810182905260240161090d565b6108a88383611fb4565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c915760405163703e46dd60e11b815260040160405180910390fd5b611ae0612009565b5f516020612b4c5f395f51905f52805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833611907565b5f80546040516324895abb60e21b8152600481018590526001600160a01b03909116906392256aec90602401602060405180830381865afa158015611b67573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b8b91906129a2565b90506001600160a01b038116611bb75760405163a89b369d60e01b81526004810184905260240161090d565b806001600160a01b0316826001600160a01b0316146108a85760405163797d290960e11b8152600481018490526001600160a01b038216602482015260440161090d565b80471015611c255760405163cf47918160e01b81524760048201526024810182905260440161090d565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611c6e576040519150601f19603f3d011682016040523d82523d5f602084013e611c73565b606091505b50509050806108a85760405163d6bda27560e01b815260040160405180910390fd5b610c91612039565b611ca5612039565b610c91612082565b611cb78282610db4565b61080d5760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161090d565b5f82815260046020526040812080546001600160a01b03199081168255600182018054909116905590611d1c600283018261227f565b611d29600383015f61227f565b611d36600483015f6122b6565b600582015f9055600682015f9055600782015f611d5391906122b6565b50505f5481516020830151604080850151608086015191516386350b7560e01b81526001600160a01b03909516946386350b7594611d989490939092916004016129bd565b5f604051808303815f87803b158015611daf575f5ffd5b505af1158015611dc1573d5f5f3e3d5ffd5b50505050806060015160065f5f5f9054906101000a90046001600160a01b03166001600160a01b0316630e9644656040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e1c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e409190612767565b81526020019081526020015f209081611e599190612a05565b505f670de0b6b3a76400006003548360a00151611e769190612abf565b611e809190612ad6565b90508015611ea0576020820151611ea0906001600160a01b031682611bfb565b60408051600181526020810183905284917fa1e25244609e9fc87130a66be00e56070db7ab94a2f4725171230ddbc9ecbd489101610f62565b5f81815260046020526040812080546001600160a01b03199081168255600182018054909116905590611f0f600283018261227f565b611f1c600383015f61227f565b611f29600483015f6122b6565b600582015f9055600682015f9055600782015f611f4691906122b6565b5050604080515f808252602082015282917fa1e25244609e9fc87130a66be00e56070db7ab94a2f4725171230ddbc9ecbd48910160405180910390a250565b5f516020612b4c5f395f51905f525460ff16610c9157604051638dfc202b60e01b815260040160405180910390fd5b611fbd826120a2565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115612001576108a88282612105565b61080d612177565b5f516020612b4c5f395f51905f525460ff1615610c915760405163d93c066560e01b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610c9157604051631afcd79f60e31b815260040160405180910390fd5b61208a612039565b5f516020612b4c5f395f51905f52805460ff19169055565b806001600160a01b03163b5f036120d757604051634c9c8ce360e01b81526001600160a01b038216600482015260240161090d565b5f516020612b0c5f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b0316846040516121219190612af5565b5f60405180830381855af49150503d805f8114612159576040519150601f19603f3d011682016040523d82523d5f602084013e61215e565b606091505b509150915061216e858383612196565b95945050505050565b3415610c915760405163b398979f60e01b815260040160405180910390fd5b6060826121ab576121a6826121f5565b6121ee565b81511580156121c257506001600160a01b0384163b155b156121eb57604051639996b31560e01b81526001600160a01b038516600482015260240161090d565b50805b9392505050565b8051156122055780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b828054828255905f5260205f2090810192821561226f579160200282015b8281111561226f5781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061223c565b5061227b9291506122cd565b5090565b50805461228b90612796565b5f825580601f1061229a575050565b601f0160209004905f5260205f20908101906108df91906122cd565b5080545f8255905f5260205f20908101906108df91905b5b8082111561227b575f81556001016122ce565b5f602082840312156122f1575f5ffd5b81356001600160e01b0319811681146121ee575f5ffd5b5f60208284031215612318575f5ffd5b5035919050565b5f8151808452602084019350602083015f5b828110156123585781516001600160a01b0316865260209586019590910190600101612331565b5093949350505050565b602081525f6121ee602083018461231f565b6001600160a01b03811681146108df575f5ffd5b5f5f60408385031215612399575f5ffd5b8235915060208301356123ab81612374565b809150509250929050565b5f5f83601f8401126123c6575f5ffd5b5081356001600160401b038111156123dc575f5ffd5b6020830191508360208285010111156123f3575f5ffd5b9250929050565b5f5f5f5f5f5f5f5f60a0898b031215612411575f5ffd5b883561241c81612374565b9750602089013561242c81612374565b965060408901356001600160401b03811115612446575f5ffd5b6124528b828c016123b6565b90975095505060608901356001600160401b03811115612470575f5ffd5b61247c8b828c016123b6565b90955093505060808901356001600160401b0381111561249a575f5ffd5b8901601f81018b136124aa575f5ffd5b80356001600160401b038111156124bf575f5ffd5b8b60208260051b84010111156124d3575f5ffd5b989b979a50959850939692959194602001935050565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561250e575f5ffd5b823561251981612374565b915060208301356001600160401b03811115612533575f5ffd5b8301601f81018513612543575f5ffd5b80356001600160401b0381111561255c5761255c6124e9565b604051601f8201601f19908116603f011681016001600160401b038111828210171561258a5761258a6124e9565b6040528181528282016020018710156125a1575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6121ee60208301846125c0565b5f5f5f60408486031215612612575f5ffd5b8335925060208401356001600160401b0381111561262e575f5ffd5b61263a868287016123b6565b9497909650939450505050565b5f5f60408385031215612658575f5ffd5b823561266381612374565b946020939093013593505050565b5f60208284031215612681575f5ffd5b81356121ee81612374565b5f5f5f5f5f60a086880312156126a0575f5ffd5b85356126ab81612374565b945060208601356126bb81612374565b94979496505050506040830135926060810135926080909101359150565b6001600160a01b0387811682528616602082015260c0604082018190525f90612704908301876125c0565b828103606084015261271681876125c0565b6080840195909552505060a00152949350505050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156107655761076561272c565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612777575f5ffd5b5051919050565b5f6001820161278f5761278f61272c565b5060010190565b600181811c908216806127aa57607f821691505b6020821081036127c857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156108a857805f5260205f20601f840160051c810160208510156127f35750805b601f840160051c820191505b81811015612812575f81556001016127ff565b5050505050565b6001600160401b03831115612830576128306124e9565b6128448361283e8354612796565b836127ce565b5f601f841160018114612875575f851561285e5750838201355b5f19600387901b1c1916600186901b178355612812565b5f83815260208120601f198716915b828110156128a45786850135825560209485019460019092019101612884565b50868210156128c0575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b038916815287602082015260a060408201525f61292160a08301888a6128d2565b82810360608401526129348187896128d2565b83810360808501528481528591506020015f5b8581101561297757823561295a81612374565b6001600160a01b0316825260209283019290910190600101612947565b509b9a5050505050505050505050565b602081525f61299a6020830184866128d2565b949350505050565b5f602082840312156129b2575f5ffd5b81516121ee81612374565b6001600160a01b038581168252841660208201526080604082018190525f906129e8908301856125c0565b82810360608401526129fa818561231f565b979650505050505050565b81516001600160401b03811115612a1e57612a1e6124e9565b612a3281612a2c8454612796565b846127ce565b6020601f821160018114612a64575f8315612a4d5750848201515b5f19600385901b1c1916600184901b178455612812565b5f84815260208120601f198516915b82811015612a935787850151825560209485019460019092019101612a73565b5084821015612ab057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b80820281158282048414176107655761076561272c565b5f82612af057634e487b7160e01b5f52601260045260245ffd5b500490565b5f82518060208501845e5f92019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a2646970667358221220caa0dc28cc5568fe13fe27e0c55daa1b2c41d828c1a03ab4cbaa57d2c7cac8fc64736f6c634300081b0033

Deployed Bytecode

0x608060405260043610610228575f3560e01c8063797669c911610129578063c320c727116100a8578063e93476831161006d578063e934768314610667578063e9b891a21461069a578063ee91ee83146106b9578063ef56f4b3146106ef578063f4ddb5be14610704575f5ffd5b8063c320c727146105b8578063ce8f189b146105d7578063d13f90b4146105f6578063d547741f14610615578063e63ab1e914610634575f5ffd5b8063a0016b8c116100ee578063a0016b8c14610518578063a217fddf14610537578063a5e9cf931461054a578063ac6a326214610569578063ad3cb1cc14610588575f5ffd5b8063797669c91461047e5780637d0eef61146104b15780638456cb59146104c65780638f1ba5db146104da57806391d14854146104f9575f5ffd5b80633f4ba83a116101b5578063538e07591161017a578063538e0759146102ce5780635a70780f146103db5780635c975abb146103fa57806362a2a47c1461041d578063705f1f5c14610450575f5ffd5b80633f4ba83a14610361578063408e2856146103755780634f1ef286146103885780634fa73a801461039b57806352d1902d146103c7575f5ffd5b8063248a9ca3116101fb578063248a9ca3146102d0578063251516b1146102ef5780632f2ff15d1461030e57806336568abe1461032d5780633ac81b991461034c575f5ffd5b806301ffc9a71461022c57806314c44e09146102605780632018b9091461028357806323fafbe8146102af575b5f5ffd5b348015610237575f5ffd5b5061024b6102463660046122e1565b610735565b60405190151581526020015b60405180910390f35b34801561026b575f5ffd5b5061027560025481565b604051908152602001610257565b34801561028e575f5ffd5b506102a261029d366004612308565b61076b565b6040516102579190612362565b3480156102ba575f5ffd5b506102ce6102c9366004612308565b6107d7565b005b3480156102db575f5ffd5b506102756102ea366004612308565b610811565b3480156102fa575f5ffd5b50610275610309366004612308565b610831565b348015610319575f5ffd5b506102ce610328366004612388565b610853565b348015610338575f5ffd5b506102ce610347366004612388565b610875565b348015610357575f5ffd5b5061027560035481565b34801561036c575f5ffd5b506102ce6108ad565b6102ce6103833660046123fa565b6108e2565b6102ce6103963660046124fd565b610bc4565b3480156103a6575f5ffd5b506103ba6103b5366004612308565b610bdf565b60405161025791906125ee565b3480156103d2575f5ffd5b50610275610c76565b3480156103e6575f5ffd5b506102a26103f5366004612308565b610c93565b348015610405575f5ffd5b505f516020612b4c5f395f51905f525460ff1661024b565b348015610428575f5ffd5b506102757f2dca0f5ce7e75a4b43fe2b0d6f5d0b7a2bf92ecf89f8f0aa17b8308b6703882181565b34801561045b575f5ffd5b5061027561046a366004612308565b5f9081526004602052604090206006015490565b348015610489575f5ffd5b506102757f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b3480156104bc575f5ffd5b5061027560015481565b3480156104d1575f5ffd5b506102ce610cfd565b3480156104e5575f5ffd5b506102ce6104f4366004612600565b610d2f565b348015610504575f5ffd5b5061024b610513366004612388565b610db4565b348015610523575f5ffd5b506102ce610532366004612308565b610dea565b348015610542575f5ffd5b506102755f81565b348015610555575f5ffd5b506102ce610564366004612308565b610e51565b348015610574575f5ffd5b506102ce610583366004612647565b610eea565b348015610593575f5ffd5b506103ba604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156105c3575f5ffd5b506102ce6105d2366004612308565b610f6f565b3480156105e2575f5ffd5b506102ce6105f1366004612671565b610fce565b348015610601575f5ffd5b506102ce61061036600461268c565b61104c565b348015610620575f5ffd5b506102ce61062f366004612388565b611220565b34801561063f575f5ffd5b506102757f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b348015610672575f5ffd5b506102757fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f8818206081565b3480156106a5575f5ffd5b506102ce6106b4366004612308565b61123c565b3480156106c4575f5ffd5b505f546106d7906001600160a01b031681565b6040516001600160a01b039091168152602001610257565b3480156106fa575f5ffd5b5061027560055481565b34801561070f575f5ffd5b5061072361071e366004612308565b611271565b604051610257969594939291906126d9565b5f6001600160e01b03198216637965db0b60e01b148061076557506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f818152600460208181526040928390209091018054835181840281018401909452808452606093928301828280156107cb57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116107ad575b50505050509050919050565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f610801816113be565b61080d823360016113c8565b5050565b5f9081525f516020612b2c5f395f51905f52602052604090206001015490565b5f81815260046020526040812060068101546007909101546107659190612740565b61085c82610811565b610865816113be565b61086f83836117ac565b50505050565b6001600160a01b038116331461089e5760405163334bd91960e11b815260040160405180910390fd5b6108a8828261184d565b505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6108d7816113be565b6108df6118c6565b50565b60025434146109165760025460405163709886f160e01b815234600482015260248101919091526044015b60405180910390fd5b6001600160a01b038816158061093357506001600160a01b038716155b156109515760405163d92e233d60e01b815260040160405180910390fd5b5f8590036109725760405163540462c360e11b815260040160405180910390fd5b5f839003610993576040516306e3be9f60e51b815260040160405180910390fd5b5f5b81811015610a9f575f80546001600160a01b0316635c7449998585858181106109c0576109c0612753565b90506020020160208101906109d59190612671565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610a17573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a3b9190612767565b90508015610a9657838383818110610a5557610a55612753565b9050602002016020810190610a6a9190612671565b60405163a31a45b360e01b81526001600160a01b0390911660048201526024810182905260440161090d565b50600101610995565b5060058054905f610aaf8361277e565b9091555050600580545f9081526004602052604080822080546001600160a01b03808e166001600160a01b031992831617909255845484528284206001018054928d16929091169190911790559154815220600201610b0f868883612819565b506005545f908152600460205260409020600301610b2e848683612819565b506005545f908152600460208190526040909120610b4e9101838361221e565b50600254600580545f90815260046020526040908190208201839055905490516001600160a01b038b16927f9a2a35be308bb80705068989272f6a21b856e34cffbe148759fe18217326c4e991610bb2918c918c908c908c908c908c908c906128fa565b60405180910390a35050505050505050565b610bcc611925565b610bd5826119c9565b61080d82826119d3565b60066020525f908152604090208054610bf790612796565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2390612796565b8015610c6e5780601f10610c4557610100808354040283529160200191610c6e565b820191905f5260205f20905b815481529060010190602001808311610c5157829003601f168201915b505050505081565b5f610c7f611a8f565b505f516020612b0c5f395f51905f5290565b565b5f818152600460209081526040918290206007018054835181840281018401909452808452606093928301828280156107cb57602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116107ad5750505050509050919050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610d27816113be565b6108df611ad8565b33610d3a8482611b20565b5f829003610d5b576040516306e3be9f60e51b815260040160405180910390fd5b5f848152600660205260409020610d73838583612819565b50837faed924a3e9eb951b4a6aed8e85626eb53583e8862528945e7ba6c1a647af5b7d8484604051610da6929190612987565b60405180910390a250505050565b5f9182525f516020612b2c5f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f610df4816113be565b815f03610e1457604051630372105960e61b815260040160405180910390fd5b60018290556040518281527f3105a3dc553e12034caac9827a83c245fe17eef4ee1eedb45238ac7449a5bbec906020015b60405180910390a15050565b7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060610e7b816113be565b670de0b6b3a7640000821115610eb55760405163e0671d3360e01b815260048101839052670de0b6b3a7640000602482015260440161090d565b60038290556040518281527fcc6bc85a9c85d9b8cdf86531486699f5c9eebde2a7e10448a5568e5c507f28eb90602001610e45565b7f2dca0f5ce7e75a4b43fe2b0d6f5d0b7a2bf92ecf89f8f0aa17b8308b67038821610f14816113be565b610f276001600160a01b03841683611bfb565b826001600160a01b03167f7b106be0748dffaea43badf09d726d1536d333bec437aaae8550c7f35d11300783604051610f6291815260200190565b60405180910390a2505050565b7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060610f99816113be565b60028290556040518281527fb120d26fad0e7bd128060711a484693f1283b8143bf94bde9df9b13217aa483690602001610e45565b5f610fd8816113be565b6001600160a01b038216610fff5760405163d92e233d60e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0384169081179091556040519081527f9226af551324226939e6695f1a5c3010b742022723785d31d14f5dcb91c57dfa90602001610e45565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03165f811580156110905750825b90505f826001600160401b031660011480156110ab5750303b155b9050811580156110b9575080155b156110d75760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561110157845460ff60401b1916600160401b1785555b611109611c95565b611111611c9d565b611119611c95565b6001600160a01b0389166111405760405163d92e233d60e01b815260040160405180910390fd5b875f0361116057604051630372105960e61b815260040160405180910390fd5b670de0b6b3a764000086111561119a5760405163e0671d3360e01b815260048101879052670de0b6b3a7640000602482015260440161090d565b5f80546001600160a01b0319166001600160a01b038b161781556001899055600288905560038790556111cd908b6117ac565b50831561121457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b61122982610811565b611232816113be565b61086f838361184d565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f611266816113be565b61080d82335f6113c8565b60046020525f90815260409020805460018201546002830180546001600160a01b039384169492909316926112a590612796565b80601f01602080910402602001604051908101604052809291908181526020018280546112d190612796565b801561131c5780601f106112f35761010080835404028352916020019161131c565b820191905f5260205f20905b8154815290600101906020018083116112ff57829003601f168201915b50505050509080600301805461133190612796565b80601f016020809104026020016040519081016040528092919081815260200182805461135d90612796565b80156113a85780601f1061137f576101008083540402835291602001916113a8565b820191905f5260205f20905b81548152906001019060200180831161138b57829003601f168201915b5050505050908060050154908060060154905086565b6108df8133611cad565b5f83815260046020908152604080832081516101008101835281546001600160a01b03908116825260018301541693810193909352600281018054919284019161141190612796565b80601f016020809104026020016040519081016040528092919081815260200182805461143d90612796565b80156114885780601f1061145f57610100808354040283529160200191611488565b820191905f5260205f20905b81548152906001019060200180831161146b57829003601f168201915b505050505081526020016003820180546114a190612796565b80601f01602080910402602001604051908101604052809291908181526020018280546114cd90612796565b80156115185780601f106114ef57610100808354040283529160200191611518565b820191905f5260205f20905b8154815290600101906020018083116114fb57829003601f168201915b505050505081526020016004820180548060200260200160405190810160405280929190818152602001828054801561157857602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161155a575b505050505081526020016005820154815260200160068201548152602001600782018054806020026020016040519081016040528092919081815260200182805480156115ec57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116115ce575b5050509190925250508151919250506001600160a01b0316611624576040516340573cb560e11b81526004810185905260240161090d565b60e0810151515f5b8181101561169d57846001600160a01b03168360e00151828151811061165457611654612753565b60200260200101516001600160a01b0316036116955760405163d141599560e01b8152600481018790526001600160a01b038616602482015260440161090d565b60010161162c565b50604080518681526001600160a01b03861660208201528415158183015290517f54df9f13d0fba24181a5d64acb9ef191b5eb43f5629b164d326282d618f3e3449181900360600190a160c08201515f6116f78284612740565b9050841561172d57816117098161277e565b92505060015482106117285761171f8785611ce6565b50505050505050565b61174c565b806117378161277e565b915050600154811061174c5761171f87611ed9565b8415611766575f8781526004602052604090206006018290555b5050505f938452505060046020908152604083206007018054600181018255908452922090910180546001600160a01b0319166001600160a01b03909216919091179055565b5f5f516020612b2c5f395f51905f526117c58484610db4565b611844575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556117fa3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610765565b5f915050610765565b5f5f516020612b2c5f395f51905f526118668484610db4565b15611844575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610765565b6118ce611f85565b5f516020612b4c5f395f51905f52805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b306001600160a01b037f0000000000000000000000002f6e3aa5a0ee65f9fd25d5248699225f733ade2f1614806119ab57507f0000000000000000000000002f6e3aa5a0ee65f9fd25d5248699225f733ade2f6001600160a01b031661199f5f516020612b0c5f395f51905f52546001600160a01b031690565b6001600160a01b031614155b15610c915760405163703e46dd60e11b815260040160405180910390fd5b5f61080d816113be565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a2d575060408051601f3d908101601f19168201909252611a2a91810190612767565b60015b611a5557604051634c9c8ce360e01b81526001600160a01b038316600482015260240161090d565b5f516020612b0c5f395f51905f528114611a8557604051632a87526960e21b81526004810182905260240161090d565b6108a88383611fb4565b306001600160a01b037f0000000000000000000000002f6e3aa5a0ee65f9fd25d5248699225f733ade2f1614610c915760405163703e46dd60e11b815260040160405180910390fd5b611ae0612009565b5f516020612b4c5f395f51905f52805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833611907565b5f80546040516324895abb60e21b8152600481018590526001600160a01b03909116906392256aec90602401602060405180830381865afa158015611b67573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b8b91906129a2565b90506001600160a01b038116611bb75760405163a89b369d60e01b81526004810184905260240161090d565b806001600160a01b0316826001600160a01b0316146108a85760405163797d290960e11b8152600481018490526001600160a01b038216602482015260440161090d565b80471015611c255760405163cf47918160e01b81524760048201526024810182905260440161090d565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611c6e576040519150601f19603f3d011682016040523d82523d5f602084013e611c73565b606091505b50509050806108a85760405163d6bda27560e01b815260040160405180910390fd5b610c91612039565b611ca5612039565b610c91612082565b611cb78282610db4565b61080d5760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161090d565b5f82815260046020526040812080546001600160a01b03199081168255600182018054909116905590611d1c600283018261227f565b611d29600383015f61227f565b611d36600483015f6122b6565b600582015f9055600682015f9055600782015f611d5391906122b6565b50505f5481516020830151604080850151608086015191516386350b7560e01b81526001600160a01b03909516946386350b7594611d989490939092916004016129bd565b5f604051808303815f87803b158015611daf575f5ffd5b505af1158015611dc1573d5f5f3e3d5ffd5b50505050806060015160065f5f5f9054906101000a90046001600160a01b03166001600160a01b0316630e9644656040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e1c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e409190612767565b81526020019081526020015f209081611e599190612a05565b505f670de0b6b3a76400006003548360a00151611e769190612abf565b611e809190612ad6565b90508015611ea0576020820151611ea0906001600160a01b031682611bfb565b60408051600181526020810183905284917fa1e25244609e9fc87130a66be00e56070db7ab94a2f4725171230ddbc9ecbd489101610f62565b5f81815260046020526040812080546001600160a01b03199081168255600182018054909116905590611f0f600283018261227f565b611f1c600383015f61227f565b611f29600483015f6122b6565b600582015f9055600682015f9055600782015f611f4691906122b6565b5050604080515f808252602082015282917fa1e25244609e9fc87130a66be00e56070db7ab94a2f4725171230ddbc9ecbd48910160405180910390a250565b5f516020612b4c5f395f51905f525460ff16610c9157604051638dfc202b60e01b815260040160405180910390fd5b611fbd826120a2565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115612001576108a88282612105565b61080d612177565b5f516020612b4c5f395f51905f525460ff1615610c915760405163d93c066560e01b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610c9157604051631afcd79f60e31b815260040160405180910390fd5b61208a612039565b5f516020612b4c5f395f51905f52805460ff19169055565b806001600160a01b03163b5f036120d757604051634c9c8ce360e01b81526001600160a01b038216600482015260240161090d565b5f516020612b0c5f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b0316846040516121219190612af5565b5f60405180830381855af49150503d805f8114612159576040519150601f19603f3d011682016040523d82523d5f602084013e61215e565b606091505b509150915061216e858383612196565b95945050505050565b3415610c915760405163b398979f60e01b815260040160405180910390fd5b6060826121ab576121a6826121f5565b6121ee565b81511580156121c257506001600160a01b0384163b155b156121eb57604051639996b31560e01b81526001600160a01b038516600482015260240161090d565b50805b9392505050565b8051156122055780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b828054828255905f5260205f2090810192821561226f579160200282015b8281111561226f5781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061223c565b5061227b9291506122cd565b5090565b50805461228b90612796565b5f825580601f1061229a575050565b601f0160209004905f5260205f20908101906108df91906122cd565b5080545f8255905f5260205f20908101906108df91905b5b8082111561227b575f81556001016122ce565b5f602082840312156122f1575f5ffd5b81356001600160e01b0319811681146121ee575f5ffd5b5f60208284031215612318575f5ffd5b5035919050565b5f8151808452602084019350602083015f5b828110156123585781516001600160a01b0316865260209586019590910190600101612331565b5093949350505050565b602081525f6121ee602083018461231f565b6001600160a01b03811681146108df575f5ffd5b5f5f60408385031215612399575f5ffd5b8235915060208301356123ab81612374565b809150509250929050565b5f5f83601f8401126123c6575f5ffd5b5081356001600160401b038111156123dc575f5ffd5b6020830191508360208285010111156123f3575f5ffd5b9250929050565b5f5f5f5f5f5f5f5f60a0898b031215612411575f5ffd5b883561241c81612374565b9750602089013561242c81612374565b965060408901356001600160401b03811115612446575f5ffd5b6124528b828c016123b6565b90975095505060608901356001600160401b03811115612470575f5ffd5b61247c8b828c016123b6565b90955093505060808901356001600160401b0381111561249a575f5ffd5b8901601f81018b136124aa575f5ffd5b80356001600160401b038111156124bf575f5ffd5b8b60208260051b84010111156124d3575f5ffd5b989b979a50959850939692959194602001935050565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561250e575f5ffd5b823561251981612374565b915060208301356001600160401b03811115612533575f5ffd5b8301601f81018513612543575f5ffd5b80356001600160401b0381111561255c5761255c6124e9565b604051601f8201601f19908116603f011681016001600160401b038111828210171561258a5761258a6124e9565b6040528181528282016020018710156125a1575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6121ee60208301846125c0565b5f5f5f60408486031215612612575f5ffd5b8335925060208401356001600160401b0381111561262e575f5ffd5b61263a868287016123b6565b9497909650939450505050565b5f5f60408385031215612658575f5ffd5b823561266381612374565b946020939093013593505050565b5f60208284031215612681575f5ffd5b81356121ee81612374565b5f5f5f5f5f60a086880312156126a0575f5ffd5b85356126ab81612374565b945060208601356126bb81612374565b94979496505050506040830135926060810135926080909101359150565b6001600160a01b0387811682528616602082015260c0604082018190525f90612704908301876125c0565b828103606084015261271681876125c0565b6080840195909552505060a00152949350505050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156107655761076561272c565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612777575f5ffd5b5051919050565b5f6001820161278f5761278f61272c565b5060010190565b600181811c908216806127aa57607f821691505b6020821081036127c857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156108a857805f5260205f20601f840160051c810160208510156127f35750805b601f840160051c820191505b81811015612812575f81556001016127ff565b5050505050565b6001600160401b03831115612830576128306124e9565b6128448361283e8354612796565b836127ce565b5f601f841160018114612875575f851561285e5750838201355b5f19600387901b1c1916600186901b178355612812565b5f83815260208120601f198716915b828110156128a45786850135825560209485019460019092019101612884565b50868210156128c0575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b038916815287602082015260a060408201525f61292160a08301888a6128d2565b82810360608401526129348187896128d2565b83810360808501528481528591506020015f5b8581101561297757823561295a81612374565b6001600160a01b0316825260209283019290910190600101612947565b509b9a5050505050505050505050565b602081525f61299a6020830184866128d2565b949350505050565b5f602082840312156129b2575f5ffd5b81516121ee81612374565b6001600160a01b038581168252841660208201526080604082018190525f906129e8908301856125c0565b82810360608401526129fa818561231f565b979650505050505050565b81516001600160401b03811115612a1e57612a1e6124e9565b612a3281612a2c8454612796565b846127ce565b6020601f821160018114612a64575f8315612a4d5750848201515b5f19600385901b1c1916600184901b178455612812565b5f84815260208120601f198516915b82811015612a935787850151825560209485019460019092019101612a73565b5084821015612ab057868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b80820281158282048414176107655761076561272c565b5f82612af057634e487b7160e01b5f52601260045260245ffd5b500490565b5f82518060208501845e5f92019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a2646970667358221220caa0dc28cc5568fe13fe27e0c55daa1b2c41d828c1a03ab4cbaa57d2c7cac8fc64736f6c634300081b0033

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

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.