S Price: $0.720513 (-0.97%)

Contract

0xf1650c618C7056F8E5e1a879eb69749D4D652E78

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:
DisputeResolver

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
File 1 of 17 : DisputeResolver.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 Dispute Resolver contract for the GasMonetization project.
 * @custom:security-contact [email protected]
 */
contract DisputeResolver is AccessControlUpgradeable, PausableUpgradeable, UUPSUpgradeable {
    using Address for address payable;

    /**
     * @dev Role for the moderator resolving disputes.
     */
    bytes32 public constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE");

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

    /**
     * @dev Role for setting refundable fee.
     */
    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 Refundable fee for single dispute.
     */
    uint256 public refundableFee;

    /**
     * @dev Approval threshold for disputes.
     */
    uint256 public approvalThreshold;

    /**
     * @dev Total amount of confiscated fees.
     */
    uint256 public confiscatedFees;

    // Custom Errors
    error ZeroAddress();
    error EmptyDisputeContact();
    error EmptyDisputeContracts();
    error InsufficientFee(uint256 given, uint256 required);
    error DisputeNotFound(uint256 disputeID);
    error DisputeAlreadyVoted(uint256 disputeID, address approver);
    error NotEnoughApprovals(uint256 numOfApprovals, uint256 threshold);
    error ThresholdMustBeGreaterThanZero();
    error ProjectNotFound(uint256 projectID);

    // Events
    event DisputeOpened(
        uint256 indexed disputeID,
        address indexed challenger,
        uint256 projectID,
        string contact,
        address[] contracts
    );
    event DisputeVoted(uint256 indexed disputeID, address indexed voter, bool approved);
    event DisputeResolved(uint256 indexed disputeID, bool approved);
    event ApprovalThresholdUpdated(uint256 newThreshold);
    event GasMonetizationUpdated(address newGasMonetization);
    event RefundableFeeUpdated(uint256 newRefundableFee);
    event ResolutionTimeoutUpdated(uint256 newResolutionTimeout);
    event ConfiscatedFeesWithdrawn(address indexed recipient, uint256 amount);

    /**
     * @dev Dispute structure.
     */
    struct Dispute {
        address challenger; // Address of the challenger.
        string contact; // Contact information for the dispute.
        uint256 paidFee; // Paid fee for the dispute.
        uint256 projectID; // Project ID of the dispute. 0 if not associated with a project.
        uint256 createdAt; // Timestamp when the dispute was created.
        address[] contracts; // Contracts involved in the dispute.
        uint256 votedFor; // Amount of positive votes
        address[] voted; // Moderators who already voted.
    }

    /**
     * @dev Dispute ID to Dispute mapping.
     */
    mapping(uint256 disputeID => Dispute) public disputes;

    /**
     * @notice Last dispute ID.
     */
    uint256 public lastDisputeID;

    /** @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 _refundableFee Refundable fee for disputes.
     * @param _approvalThreshold Approval threshold for disputes.
     */
    function initialize(
        address _admin,
        address _gasMonetization,
        uint256 _refundableFee,
        uint256 _approvalThreshold
    ) external initializer {
        __AccessControl_init();
        __Pausable_init();
        __UUPSUpgradeable_init();

        if (_gasMonetization == address(0)) {
            revert ZeroAddress();
        }
        if (_approvalThreshold == 0) {
            revert ThresholdMustBeGreaterThanZero();
        }

        gasMonetization = IGasMonetization(_gasMonetization);
        refundableFee = _refundableFee;
        approvalThreshold = _approvalThreshold;

        _grantRole(DEFAULT_ADMIN_ROLE, _admin);
    }

    /**
     * @notice Open a new dispute.
     * @param projectID Project ID of the dispute. Zero if not associated with a project.
     * @param contactInfo Contact information for the dispute.
     * @param contracts Contracts involved in the dispute.
     */
    function openDispute(
        uint256 projectID,
        string calldata contactInfo,
        address[] calldata contracts
    ) external payable whenNotPaused {
        if (msg.value != refundableFee) {
            revert InsufficientFee(msg.value, refundableFee);
        }
        if (bytes(contactInfo).length == 0) {
            revert EmptyDisputeContact();
        }
        if (contracts.length == 0) {
            revert EmptyDisputeContracts();
        }
        if (projectID != 0 && gasMonetization.getProjectOwner(projectID) == address(0)) {
            revert ProjectNotFound(projectID);
        }

        lastDisputeID++;
        disputes[lastDisputeID].challenger = _msgSender();
        disputes[lastDisputeID].contact = contactInfo;
        disputes[lastDisputeID].paidFee = msg.value;
        disputes[lastDisputeID].projectID = projectID;
        disputes[lastDisputeID].createdAt = block.timestamp;
        disputes[lastDisputeID].contracts = contracts;

        emit DisputeOpened(lastDisputeID, _msgSender(), projectID, contactInfo, contracts);
    }

    /**
     * @notice Approve a dispute. Only moderators can approve disputes.
     * @param disputeID ID of the dispute.
     */
    function approveDispute(uint256 disputeID) external onlyRole(MODERATOR_ROLE) {
        _voteDispute(disputeID, _msgSender(), true);
    }

    /**
     * @notice Reject a dispute. Only moderators can reject disputes.
     * @param disputeID ID of the dispute.
     */
    function rejectDispute(uint256 disputeID) external onlyRole(MODERATOR_ROLE) {
        _voteDispute(disputeID, _msgSender(), false);
    }

    /**
     * @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 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 Set the refundable fee for disputes.
     * @param _refundableFee Refundable fee for disputes.
     */
    function setRefundableFee(uint256 _refundableFee) external onlyRole(FEE_SETTER_ROLE) {
        refundableFee = _refundableFee;
        emit RefundableFeeUpdated(refundableFee);
    }

    /**
     * @notice Withdraw confiscated fees.
     * @param recipient Recipient of the refundable fees.
     */
    function withdrawConfiscatedFees(address payable recipient) external onlyRole(FEES_COLLECTOR_ROLE) {
        uint256 amount = confiscatedFees;
        confiscatedFees = 0;
        recipient.sendValue(amount);
        emit ConfiscatedFeesWithdrawn(recipient, amount);
    }

    /**
     * @notice Get the contracts involved in the dispute.
     * @param disputeID Dispute ID.
     * @return Contracts involved in the dispute.
     */
    function disputeContracts(uint256 disputeID) external view returns (address[] memory) {
        return disputes[disputeID].contracts;
    }

    /**
     * @notice Get list of moderators who voted for or against the dispute.
     * @param disputeID Dispute ID.
     * @return Votes for or against the dispute.
     */
    function disputeVoted(uint256 disputeID) external view returns (address[] memory) {
        return disputes[disputeID].voted;
    }

    /**
     * @notice Get the number of votes for the dispute.
     * @param disputeID Dispute ID.
     * @return Number of approvals for the dispute.
     */
    function disputeVotedFor(uint256 disputeID) external view returns (uint256) {
        return disputes[disputeID].votedFor;
    }

    /**
     * @notice Get the number of votes against the dispute.
     * @param disputeID Dispute ID.
     * @return Number of declines for the dispute.
     */
    function disputeVotedAgainst(uint256 disputeID) external view returns (uint256) {
        return disputes[disputeID].voted.length - disputes[disputeID].votedFor;
    }

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

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

    /**
     * @dev Vote on a dispute.
     * @param disputeID Dispute ID.
     * @param moderator Moderator voting on the dispute.
     * @param approved True if the dispute was approved.
     */
    function _voteDispute(uint256 disputeID, address moderator, bool approved) private {
        Dispute memory dispute = disputes[disputeID];

        if (dispute.challenger == address(0)) {
            revert DisputeNotFound(disputeID);
        }

        uint256 numOfVotes = dispute.voted.length;
        for (uint256 i = 0; i < numOfVotes; i++) {
            // check if the moderator already voted
            if (dispute.voted[i] == moderator) {
                revert DisputeAlreadyVoted(disputeID, moderator);
            }
        }
        emit DisputeVoted(disputeID, moderator, approved);

        uint256 numOfApprovals = dispute.votedFor;
        uint256 numOfRejections = numOfVotes - numOfApprovals;
        if (approved) {
            numOfApprovals++;
            // successfully resolve the dispute if the approval threshold is reached
            if (numOfApprovals >= approvalThreshold) {
                _acceptDispute(disputeID, dispute);
                return;
            }
        } else {
            numOfRejections++;
            // reject the dispute if the rejection threshold is reached
            if (numOfRejections >= approvalThreshold) {
                _rejectDispute(disputeID, dispute);
                return;
            }
        }
        // add the vote
        if (approved) {
            disputes[disputeID].votedFor = numOfApprovals;
        }
        disputes[disputeID].voted.push(moderator);
    }

    /**
     * @dev Accept the dispute.
     * @param disputeID Dispute ID.
     * @param dispute Dispute data.
     */
    function _acceptDispute(uint256 disputeID, Dispute memory dispute) private {
        delete disputes[disputeID];
        // unregister all contracts involved in the dispute
        uint256 numOfContracts = dispute.contracts.length;
        for (uint256 i = 0; i < numOfContracts; i++) {
            uint256 projectID = gasMonetization.getProjectIdOfContract(dispute.contracts[i]);
            if (projectID != 0) {
                gasMonetization.removeProjectContract(projectID, dispute.contracts[i]);
            }
            // if project id was provided, register the contract to the project
            if (dispute.projectID != 0) {
                gasMonetization.addProjectContract(dispute.projectID, dispute.contracts[i]);
            }
        }
        // refund the fee to the challenger
        payable(dispute.challenger).sendValue(dispute.paidFee);
        emit DisputeResolved(disputeID, true);
    }

    /**
     * @dev Reject the dispute.
     * @param disputeID Dispute ID.
     * @param dispute Dispute data.
     */
    function _rejectDispute(uint256 disputeID, Dispute memory dispute) private {
        delete disputes[disputeID];
        // confiscate the fee
        confiscatedFees += dispute.paidFee;
        emit DisputeResolved(disputeID, false);
    }

    /**
     * @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) {}
}

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":"uint256","name":"disputeID","type":"uint256"},{"internalType":"address","name":"approver","type":"address"}],"name":"DisputeAlreadyVoted","type":"error"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"DisputeNotFound","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":"EmptyDisputeContracts","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":"InsufficientFee","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[{"internalType":"uint256","name":"numOfApprovals","type":"uint256"},{"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"NotEnoughApprovals","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"uint256","name":"projectID","type":"uint256"}],"name":"ProjectNotFound","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":"ConfiscatedFeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"disputeID","type":"uint256"},{"indexed":true,"internalType":"address","name":"challenger","type":"address"},{"indexed":false,"internalType":"uint256","name":"projectID","type":"uint256"},{"indexed":false,"internalType":"string","name":"contact","type":"string"},{"indexed":false,"internalType":"address[]","name":"contracts","type":"address[]"}],"name":"DisputeOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"disputeID","type":"uint256"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"DisputeResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"disputeID","type":"uint256"},{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"DisputeVoted","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":false,"internalType":"uint256","name":"newRefundableFee","type":"uint256"}],"name":"RefundableFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newResolutionTimeout","type":"uint256"}],"name":"ResolutionTimeoutUpdated","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":"FEES_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":"disputeID","type":"uint256"}],"name":"approveDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"confiscatedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"disputeContracts","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"disputeVoted","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"disputeVotedAgainst","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"disputeVotedFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"disputes","outputs":[{"internalType":"address","name":"challenger","type":"address"},{"internalType":"string","name":"contact","type":"string"},{"internalType":"uint256","name":"paidFee","type":"uint256"},{"internalType":"uint256","name":"projectID","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"},{"internalType":"uint256","name":"votedFor","type":"uint256"}],"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":"_refundableFee","type":"uint256"},{"internalType":"uint256","name":"_approvalThreshold","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastDisputeID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectID","type":"uint256"},{"internalType":"string","name":"contactInfo","type":"string"},{"internalType":"address[]","name":"contracts","type":"address[]"}],"name":"openDispute","outputs":[],"stateMutability":"payable","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":"refundableFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeID","type":"uint256"}],"name":"rejectDispute","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":"_refundableFee","type":"uint256"}],"name":"setRefundableFee","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":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"}],"name":"withdrawConfiscatedFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405230608052348015610013575f5ffd5b5061001c610021565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100715760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516124f86100f95f395f81816114e10152818161150a015261164d01526124f85ff3fe6080604052600436106101fc575f3560e01c80637d0eef6111610113578063ce8f189b1161009d578063e93476831161006d578063e9347683146105f0578063eb39c1e514610623578063eb990c5914610638578063ee91ee8314610657578063f22f31871461068d575f5ffd5b8063ce8f189b1461056a578063d547741f14610589578063d983de4e146105a8578063e63ab1e9146105bd575f5ffd5b80639f12c23c116100e35780639f12c23c146104c9578063a0016b8c146104e8578063a217fddf14610507578063ad3cb1cc1461051a578063b5d0400014610557575f5ffd5b80637d0eef61146104625780638456cb591461047757806391d148541461048b5780639d903005146104aa575f5ffd5b806336568abe1161019457806352d1902d1161016457806352d1902d146103a8578063564a565d146103bc57806356d400a1146103ed5780635c975abb1461040c578063797669c91461042f575f5ffd5b806336568abe1461034d5780633747f9071461036c5780633f4ba83a146103815780634f1ef28614610395575f5ffd5b8063248a9ca3116101cf578063248a9ca3146102bb5780632d4fd9dd146102da5780632f2ff15d146102fb57806330c239ce1461031a575f5ffd5b806301ffc9a71461020057806303a1d9b91461023457806310579ece146102605780631c1e469b1461029c575b5f5ffd5b34801561020b575f5ffd5b5061021f61021a366004611e7a565b6106ac565b60405190151581526020015b60405180910390f35b34801561023f575f5ffd5b5061025361024e366004611ea1565b6106e2565b60405161022b9190611eb8565b34801561026b575f5ffd5b5061028e61027a366004611ea1565b5f9081526004602052604090206006015490565b60405190815260200161022b565b3480156102a7575f5ffd5b506102536102b6366004611ea1565b61074e565b3480156102c6575f5ffd5b5061028e6102d5366004611ea1565b6107b8565b3480156102e5575f5ffd5b506102f96102f4366004611ea1565b6107d8565b005b348015610306575f5ffd5b506102f9610315366004611f17565b610811565b348015610325575f5ffd5b5061028e7febcf373d72452a4b3b09b59ca465b00611f2b1004843e3bc195c5ac67bce9d7981565b348015610358575f5ffd5b506102f9610367366004611f17565b610833565b348015610377575f5ffd5b5061028e60035481565b34801561038c575f5ffd5b506102f961086b565b6102f96103a3366004611f59565b6108a0565b3480156103b3575f5ffd5b5061028e6108bb565b3480156103c7575f5ffd5b506103db6103d6366004611ea1565b6108d6565b60405161022b9695949392919061204d565b3480156103f8575f5ffd5b506102f9610407366004611ea1565b61099a565b348015610417575f5ffd5b505f5160206124a35f395f51905f525460ff1661021f565b34801561043a575f5ffd5b5061028e7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b34801561046d575f5ffd5b5061028e60025481565b348015610482575f5ffd5b506102f96109d0565b348015610496575f5ffd5b5061021f6104a5366004611f17565b610a02565b3480156104b5575f5ffd5b506102f96104c4366004611ea1565b610a38565b3480156104d4575f5ffd5b5061028e6104e3366004611ea1565b610a9f565b3480156104f3575f5ffd5b506102f9610502366004611ea1565b610ac1565b348015610512575f5ffd5b5061028e5f81565b348015610525575f5ffd5b5061054a604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161022b9190612095565b6102f96105653660046120ef565b610b20565b348015610575575f5ffd5b506102f9610584366004612197565b610d3b565b348015610594575f5ffd5b506102f96105a3366004611f17565b610db9565b3480156105b3575f5ffd5b5061028e60015481565b3480156105c8575f5ffd5b5061028e7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b3480156105fb575f5ffd5b5061028e7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f8818206081565b34801561062e575f5ffd5b5061028e60055481565b348015610643575f5ffd5b506102f96106523660046121b2565b610dd5565b348015610662575f5ffd5b505f54610675906001600160a01b031681565b6040516001600160a01b03909116815260200161022b565b348015610698575f5ffd5b506102f96106a7366004612197565b610f6b565b5f6001600160e01b03198216637965db0b60e01b14806106dc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f8181526004602090815260409182902060050180548351818402810184019094528084526060939283018282801561074257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610724575b50505050509050919050565b5f8181526004602090815260409182902060070180548351818402810184019094528084526060939283018282801561074257602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116107245750505050509050919050565b5f9081525f5160206124835f395f51905f52602052604090206001015490565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f61080281610ff8565b61080d82335f611002565b5050565b61081a826107b8565b61082381610ff8565b61082d838361135d565b50505050565b6001600160a01b038116331461085c5760405163334bd91960e11b815260040160405180910390fd5b61086682826113fe565b505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61089581610ff8565b61089d611477565b50565b6108a86114d6565b6108b18261157c565b61080d8282611586565b5f6108c4611642565b505f5160206124635f395f51905f5290565b60046020525f9081526040902080546001820180546001600160a01b039092169291610901906121f5565b80601f016020809104026020016040519081016040528092919081815260200182805461092d906121f5565b80156109785780601f1061094f57610100808354040283529160200191610978565b820191905f5260205f20905b81548152906001019060200180831161095b57829003601f168201915b5050505050908060020154908060030154908060040154908060060154905086565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f6109c481610ff8565b61080d82336001611002565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6109fa81610ff8565b61089d61168b565b5f9182525f5160206124835f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060610a6281610ff8565b60018290556040518281527fdf533b67e2b1b40ddaca67a7cfee2a2144a0bc9998328ea1b8cbbdb3cb931d2e906020015b60405180910390a15050565b5f81815260046020526040812060068101546007909101546106dc9190612241565b5f610acb81610ff8565b815f03610aeb57604051630372105960e61b815260040160405180910390fd5b60028290556040518281527f3105a3dc553e12034caac9827a83c245fe17eef4ee1eedb45238ac7449a5bbec90602001610a93565b610b286116d3565b6001543414610b5c5760015460405163a458261b60e01b815234600482015260248101919091526044015b60405180910390fd5b5f839003610b7d576040516306e3be9f60e51b815260040160405180910390fd5b5f819003610b9e5760405163077aacb960e31b815260040160405180910390fd5b8415801590610c1e57505f80546040516324895abb60e21b8152600481018890526001600160a01b03909116906392256aec90602401602060405180830381865afa158015610bef573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c139190612254565b6001600160a01b0316145b15610c3f5760405163a89b369d60e01b815260048101869052602401610b53565b60058054905f610c4e8361226f565b9190505550610c5a3390565b600580545f9081526004602052604080822080546001600160a01b0319166001600160a01b0395909516949094179093559054815220600101610c9e8486836122d2565b50600580545f90815260046020819052604080832034600290910155835483528083206003018990558354835280832042920191909155825482529020610ce791018383611db7565b50336001600160a01b03166005547f74f7f9187c302cacd63621e4748404e28dd47ff6c0ea2c836dbe2c21bd39532c8787878787604051610d2c95949392919061238c565b60405180910390a35050505050565b5f610d4581610ff8565b6001600160a01b038216610d6c5760405163d92e233d60e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0384169081179091556040519081527f9226af551324226939e6695f1a5c3010b742022723785d31d14f5dcb91c57dfa90602001610a93565b610dc2826107b8565b610dcb81610ff8565b61082d83836113fe565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610e1a5750825b90505f8267ffffffffffffffff166001148015610e365750303b155b905081158015610e44575080155b15610e625760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610e8c57845460ff60401b1916600160401b1785555b610e94611703565b610e9c61170b565b610ea4611703565b6001600160a01b038816610ecb5760405163d92e233d60e01b815260040160405180910390fd5b855f03610eeb57604051630372105960e61b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b038a1617815560018890556002879055610f19908a61135d565b508315610f6057845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b7febcf373d72452a4b3b09b59ca465b00611f2b1004843e3bc195c5ac67bce9d79610f9581610ff8565b600380545f909155610fb06001600160a01b0384168261171b565b826001600160a01b03167fce65019778ef2d5baa451873ab8f983ab82cf809b40347f2f764fe7ba172d24682604051610feb91815260200190565b60405180910390a2505050565b61089d81336117b5565b5f8381526004602090815260408083208151610100810190925280546001600160a01b031682526001810180549293919291840191611040906121f5565b80601f016020809104026020016040519081016040528092919081815260200182805461106c906121f5565b80156110b75780601f1061108e576101008083540402835291602001916110b7565b820191905f5260205f20905b81548152906001019060200180831161109a57829003601f168201915b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820180548060200260200160405190810160405280929190818152602001828054801561113557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611117575b50505050508152602001600682015481526020016007820180548060200260200160405190810160405280929190818152602001828054801561119f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611181575b5050509190925250508151919250506001600160a01b03166111d757604051634294e0f760e01b815260048101859052602401610b53565b60e0810151515f5b8181101561125057846001600160a01b03168360e0015182815181106112075761120761240e565b60200260200101516001600160a01b0316036112485760405163eac03abb60e01b8152600481018790526001600160a01b0386166024820152604401610b53565b6001016111df565b50836001600160a01b0316857f910296c2d7f214e2d62a9c4e6e403cc9c5ac4585d96830dbf018e51c75fd08268560405161128f911515815260200190565b60405180910390a360c08201515f6112a78284612241565b905084156112dd57816112b98161226f565b92505060025482106112d8576112cf87856117ee565b50505050505050565b6112fd565b806112e78161226f565b91505060025481106112fd576112cf8785611a96565b8415611317575f8781526004602052604090206006018290555b5050505f938452505060046020908152604083206007018054600181018255908452922090910180546001600160a01b0319166001600160a01b03909216919091179055565b5f5f5160206124835f395f51905f526113768484610a02565b6113f5575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556113ab3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106dc565b5f9150506106dc565b5f5f5160206124835f395f51905f526114178484610a02565b156113f5575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106dc565b61147f611b4e565b5f5160206124a35f395f51905f52805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061155c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115505f5160206124635f395f51905f52546001600160a01b031690565b6001600160a01b031614155b1561157a5760405163703e46dd60e11b815260040160405180910390fd5b565b5f61080d81610ff8565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156115e0575060408051601f3d908101601f191682019092526115dd91810190612422565b60015b61160857604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610b53565b5f5160206124635f395f51905f52811461163857604051632a87526960e21b815260048101829052602401610b53565b6108668383611b7d565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461157a5760405163703e46dd60e11b815260040160405180910390fd5b6116936116d3565b5f5160206124a35f395f51905f52805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336114b8565b5f5160206124a35f395f51905f525460ff161561157a5760405163d93c066560e01b815260040160405180910390fd5b61157a611bd2565b611713611bd2565b61157a611c1b565b804710156117455760405163cf47918160e01b815247600482015260248101829052604401610b53565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f811461178e576040519150601f19603f3d011682016040523d82523d5f602084013e611793565b606091505b50509050806108665760405163d6bda27560e01b815260040160405180910390fd5b6117bf8282610a02565b61080d5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610b53565b5f82815260046020526040812080546001600160a01b0319168155906118176001830182611e18565b600282015f9055600382015f9055600482015f9055600582015f61183b9190611e4f565b600682015f9055600782015f6118519190611e4f565b505060a0810151515f5b81811015611a46575f805460a085015180516001600160a01b0390921691635c7449999190859081106118905761189061240e565b60200260200101516040518263ffffffff1660e01b81526004016118c391906001600160a01b0391909116815260200190565b602060405180830381865afa1580156118de573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119029190612422565b9050801561199c575f5460a085015180516001600160a01b039092169163c4d33f07918491869081106119375761193761240e565b60200260200101516040518363ffffffff1660e01b815260040161196e9291909182526001600160a01b0316602082015260400190565b5f604051808303815f87803b158015611985575f5ffd5b505af1158015611997573d5f5f3e3d5ffd5b505050505b606084015115611a3d575f54606085015160a086015180516001600160a01b03909316926366328a0a929190869081106119d8576119d861240e565b60200260200101516040518363ffffffff1660e01b8152600401611a0f9291909182526001600160a01b0316602082015260400190565b5f604051808303815f87803b158015611a26575f5ffd5b505af1158015611a38573d5f5f3e3d5ffd5b505050505b5060010161185b565b5060408201518251611a63916001600160a01b039091169061171b565b6040516001815283907f5a87909bff68caaaaf0b3fd9c74eeccc928832f879315e5c6fb7a73612f26c0c90602001610feb565b5f82815260046020526040812080546001600160a01b031916815590611abf6001830182611e18565b600282015f9055600382015f9055600482015f9055600582015f611ae39190611e4f565b600682015f9055600782015f611af99190611e4f565b5050806040015160035f828254611b109190612439565b90915550506040515f815282907f5a87909bff68caaaaf0b3fd9c74eeccc928832f879315e5c6fb7a73612f26c0c9060200160405180910390a25050565b5f5160206124a35f395f51905f525460ff1661157a57604051638dfc202b60e01b815260040160405180910390fd5b611b8682611c3b565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115611bca576108668282611c9e565b61080d611d10565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661157a57604051631afcd79f60e31b815260040160405180910390fd5b611c23611bd2565b5f5160206124a35f395f51905f52805460ff19169055565b806001600160a01b03163b5f03611c7057604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610b53565b5f5160206124635f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b031684604051611cba919061244c565b5f60405180830381855af49150503d805f8114611cf2576040519150601f19603f3d011682016040523d82523d5f602084013e611cf7565b606091505b5091509150611d07858383611d2f565b95945050505050565b341561157a5760405163b398979f60e01b815260040160405180910390fd5b606082611d4457611d3f82611d8e565b611d87565b8151158015611d5b57506001600160a01b0384163b155b15611d8457604051639996b31560e01b81526001600160a01b0385166004820152602401610b53565b50805b9392505050565b805115611d9e5780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b828054828255905f5260205f20908101928215611e08579160200282015b82811115611e085781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190611dd5565b50611e14929150611e66565b5090565b508054611e24906121f5565b5f825580601f10611e33575050565b601f0160209004905f5260205f209081019061089d9190611e66565b5080545f8255905f5260205f209081019061089d91905b5b80821115611e14575f8155600101611e67565b5f60208284031215611e8a575f5ffd5b81356001600160e01b031981168114611d87575f5ffd5b5f60208284031215611eb1575f5ffd5b5035919050565b602080825282518282018190525f918401906040840190835b81811015611ef85783516001600160a01b0316835260209384019390920191600101611ed1565b509095945050505050565b6001600160a01b038116811461089d575f5ffd5b5f5f60408385031215611f28575f5ffd5b823591506020830135611f3a81611f03565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215611f6a575f5ffd5b8235611f7581611f03565b9150602083013567ffffffffffffffff811115611f90575f5ffd5b8301601f81018513611fa0575f5ffd5b803567ffffffffffffffff811115611fba57611fba611f45565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611fe957611fe9611f45565b604052818152828201602001871015612000575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038716815260c0602082018190525f906120709083018861201f565b90508560408301528460608301528360808301528260a0830152979650505050505050565b602081525f611d87602083018461201f565b5f5f83601f8401126120b7575f5ffd5b50813567ffffffffffffffff8111156120ce575f5ffd5b6020830191508360208260051b85010111156120e8575f5ffd5b9250929050565b5f5f5f5f5f60608688031215612103575f5ffd5b85359450602086013567ffffffffffffffff811115612120575f5ffd5b8601601f81018813612130575f5ffd5b803567ffffffffffffffff811115612146575f5ffd5b886020828401011115612157575f5ffd5b60209190910194509250604086013567ffffffffffffffff81111561217a575f5ffd5b612186888289016120a7565b969995985093965092949392505050565b5f602082840312156121a7575f5ffd5b8135611d8781611f03565b5f5f5f5f608085870312156121c5575f5ffd5b84356121d081611f03565b935060208501356121e081611f03565b93969395505050506040820135916060013590565b600181811c9082168061220957607f821691505b60208210810361222757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106dc576106dc61222d565b5f60208284031215612264575f5ffd5b8151611d8781611f03565b5f600182016122805761228061222d565b5060010190565b601f82111561086657805f5260205f20601f840160051c810160208510156122ac5750805b601f840160051c820191505b818110156122cb575f81556001016122b8565b5050505050565b67ffffffffffffffff8311156122ea576122ea611f45565b6122fe836122f883546121f5565b83612287565b5f601f84116001811461232f575f85156123185750838201355b5f19600387901b1c1916600186901b1783556122cb565b5f83815260208120601f198716915b8281101561235e578685013582556020948501946001909201910161233e565b508682101561237a575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b85815260606020820152836060820152838560808301375f60808583018101829052601f19601f8701168301838103820160408501529081018490528490829060a0015b858210156124015782356123e381611f03565b6001600160a01b0316815260209283019260019290920191016123d0565b9998505050505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612432575f5ffd5b5051919050565b808201808211156106dc576106dc61222d565b5f82518060208501845e5f92019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a26469706673582212205b921de487068c2589585918fe2907fd8bec76cbc5694fb7c25fe77e45bb861064736f6c634300081b0033

Deployed Bytecode

0x6080604052600436106101fc575f3560e01c80637d0eef6111610113578063ce8f189b1161009d578063e93476831161006d578063e9347683146105f0578063eb39c1e514610623578063eb990c5914610638578063ee91ee8314610657578063f22f31871461068d575f5ffd5b8063ce8f189b1461056a578063d547741f14610589578063d983de4e146105a8578063e63ab1e9146105bd575f5ffd5b80639f12c23c116100e35780639f12c23c146104c9578063a0016b8c146104e8578063a217fddf14610507578063ad3cb1cc1461051a578063b5d0400014610557575f5ffd5b80637d0eef61146104625780638456cb591461047757806391d148541461048b5780639d903005146104aa575f5ffd5b806336568abe1161019457806352d1902d1161016457806352d1902d146103a8578063564a565d146103bc57806356d400a1146103ed5780635c975abb1461040c578063797669c91461042f575f5ffd5b806336568abe1461034d5780633747f9071461036c5780633f4ba83a146103815780634f1ef28614610395575f5ffd5b8063248a9ca3116101cf578063248a9ca3146102bb5780632d4fd9dd146102da5780632f2ff15d146102fb57806330c239ce1461031a575f5ffd5b806301ffc9a71461020057806303a1d9b91461023457806310579ece146102605780631c1e469b1461029c575b5f5ffd5b34801561020b575f5ffd5b5061021f61021a366004611e7a565b6106ac565b60405190151581526020015b60405180910390f35b34801561023f575f5ffd5b5061025361024e366004611ea1565b6106e2565b60405161022b9190611eb8565b34801561026b575f5ffd5b5061028e61027a366004611ea1565b5f9081526004602052604090206006015490565b60405190815260200161022b565b3480156102a7575f5ffd5b506102536102b6366004611ea1565b61074e565b3480156102c6575f5ffd5b5061028e6102d5366004611ea1565b6107b8565b3480156102e5575f5ffd5b506102f96102f4366004611ea1565b6107d8565b005b348015610306575f5ffd5b506102f9610315366004611f17565b610811565b348015610325575f5ffd5b5061028e7febcf373d72452a4b3b09b59ca465b00611f2b1004843e3bc195c5ac67bce9d7981565b348015610358575f5ffd5b506102f9610367366004611f17565b610833565b348015610377575f5ffd5b5061028e60035481565b34801561038c575f5ffd5b506102f961086b565b6102f96103a3366004611f59565b6108a0565b3480156103b3575f5ffd5b5061028e6108bb565b3480156103c7575f5ffd5b506103db6103d6366004611ea1565b6108d6565b60405161022b9695949392919061204d565b3480156103f8575f5ffd5b506102f9610407366004611ea1565b61099a565b348015610417575f5ffd5b505f5160206124a35f395f51905f525460ff1661021f565b34801561043a575f5ffd5b5061028e7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f81565b34801561046d575f5ffd5b5061028e60025481565b348015610482575f5ffd5b506102f96109d0565b348015610496575f5ffd5b5061021f6104a5366004611f17565b610a02565b3480156104b5575f5ffd5b506102f96104c4366004611ea1565b610a38565b3480156104d4575f5ffd5b5061028e6104e3366004611ea1565b610a9f565b3480156104f3575f5ffd5b506102f9610502366004611ea1565b610ac1565b348015610512575f5ffd5b5061028e5f81565b348015610525575f5ffd5b5061054a604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161022b9190612095565b6102f96105653660046120ef565b610b20565b348015610575575f5ffd5b506102f9610584366004612197565b610d3b565b348015610594575f5ffd5b506102f96105a3366004611f17565b610db9565b3480156105b3575f5ffd5b5061028e60015481565b3480156105c8575f5ffd5b5061028e7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b3480156105fb575f5ffd5b5061028e7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f8818206081565b34801561062e575f5ffd5b5061028e60055481565b348015610643575f5ffd5b506102f96106523660046121b2565b610dd5565b348015610662575f5ffd5b505f54610675906001600160a01b031681565b6040516001600160a01b03909116815260200161022b565b348015610698575f5ffd5b506102f96106a7366004612197565b610f6b565b5f6001600160e01b03198216637965db0b60e01b14806106dc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f8181526004602090815260409182902060050180548351818402810184019094528084526060939283018282801561074257602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311610724575b50505050509050919050565b5f8181526004602090815260409182902060070180548351818402810184019094528084526060939283018282801561074257602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116107245750505050509050919050565b5f9081525f5160206124835f395f51905f52602052604090206001015490565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f61080281610ff8565b61080d82335f611002565b5050565b61081a826107b8565b61082381610ff8565b61082d838361135d565b50505050565b6001600160a01b038116331461085c5760405163334bd91960e11b815260040160405180910390fd5b61086682826113fe565b505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61089581610ff8565b61089d611477565b50565b6108a86114d6565b6108b18261157c565b61080d8282611586565b5f6108c4611642565b505f5160206124635f395f51905f5290565b60046020525f9081526040902080546001820180546001600160a01b039092169291610901906121f5565b80601f016020809104026020016040519081016040528092919081815260200182805461092d906121f5565b80156109785780601f1061094f57610100808354040283529160200191610978565b820191905f5260205f20905b81548152906001019060200180831161095b57829003601f168201915b5050505050908060020154908060030154908060040154908060060154905086565b7f71f3d55856e4058ed06ee057d79ada615f65cdf5f9ee88181b914225088f834f6109c481610ff8565b61080d82336001611002565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6109fa81610ff8565b61089d61168b565b5f9182525f5160206124835f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7fe6ad9a47fbda1dc18de1eb5eeb7d935e5e81b4748f3cfc61e233e64f88182060610a6281610ff8565b60018290556040518281527fdf533b67e2b1b40ddaca67a7cfee2a2144a0bc9998328ea1b8cbbdb3cb931d2e906020015b60405180910390a15050565b5f81815260046020526040812060068101546007909101546106dc9190612241565b5f610acb81610ff8565b815f03610aeb57604051630372105960e61b815260040160405180910390fd5b60028290556040518281527f3105a3dc553e12034caac9827a83c245fe17eef4ee1eedb45238ac7449a5bbec90602001610a93565b610b286116d3565b6001543414610b5c5760015460405163a458261b60e01b815234600482015260248101919091526044015b60405180910390fd5b5f839003610b7d576040516306e3be9f60e51b815260040160405180910390fd5b5f819003610b9e5760405163077aacb960e31b815260040160405180910390fd5b8415801590610c1e57505f80546040516324895abb60e21b8152600481018890526001600160a01b03909116906392256aec90602401602060405180830381865afa158015610bef573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c139190612254565b6001600160a01b0316145b15610c3f5760405163a89b369d60e01b815260048101869052602401610b53565b60058054905f610c4e8361226f565b9190505550610c5a3390565b600580545f9081526004602052604080822080546001600160a01b0319166001600160a01b0395909516949094179093559054815220600101610c9e8486836122d2565b50600580545f90815260046020819052604080832034600290910155835483528083206003018990558354835280832042920191909155825482529020610ce791018383611db7565b50336001600160a01b03166005547f74f7f9187c302cacd63621e4748404e28dd47ff6c0ea2c836dbe2c21bd39532c8787878787604051610d2c95949392919061238c565b60405180910390a35050505050565b5f610d4581610ff8565b6001600160a01b038216610d6c5760405163d92e233d60e01b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b0384169081179091556040519081527f9226af551324226939e6695f1a5c3010b742022723785d31d14f5dcb91c57dfa90602001610a93565b610dc2826107b8565b610dcb81610ff8565b61082d83836113fe565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f81158015610e1a5750825b90505f8267ffffffffffffffff166001148015610e365750303b155b905081158015610e44575080155b15610e625760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610e8c57845460ff60401b1916600160401b1785555b610e94611703565b610e9c61170b565b610ea4611703565b6001600160a01b038816610ecb5760405163d92e233d60e01b815260040160405180910390fd5b855f03610eeb57604051630372105960e61b815260040160405180910390fd5b5f80546001600160a01b0319166001600160a01b038a1617815560018890556002879055610f19908a61135d565b508315610f6057845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b7febcf373d72452a4b3b09b59ca465b00611f2b1004843e3bc195c5ac67bce9d79610f9581610ff8565b600380545f909155610fb06001600160a01b0384168261171b565b826001600160a01b03167fce65019778ef2d5baa451873ab8f983ab82cf809b40347f2f764fe7ba172d24682604051610feb91815260200190565b60405180910390a2505050565b61089d81336117b5565b5f8381526004602090815260408083208151610100810190925280546001600160a01b031682526001810180549293919291840191611040906121f5565b80601f016020809104026020016040519081016040528092919081815260200182805461106c906121f5565b80156110b75780601f1061108e576101008083540402835291602001916110b7565b820191905f5260205f20905b81548152906001019060200180831161109a57829003601f168201915b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820180548060200260200160405190810160405280929190818152602001828054801561113557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611117575b50505050508152602001600682015481526020016007820180548060200260200160405190810160405280929190818152602001828054801561119f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611181575b5050509190925250508151919250506001600160a01b03166111d757604051634294e0f760e01b815260048101859052602401610b53565b60e0810151515f5b8181101561125057846001600160a01b03168360e0015182815181106112075761120761240e565b60200260200101516001600160a01b0316036112485760405163eac03abb60e01b8152600481018790526001600160a01b0386166024820152604401610b53565b6001016111df565b50836001600160a01b0316857f910296c2d7f214e2d62a9c4e6e403cc9c5ac4585d96830dbf018e51c75fd08268560405161128f911515815260200190565b60405180910390a360c08201515f6112a78284612241565b905084156112dd57816112b98161226f565b92505060025482106112d8576112cf87856117ee565b50505050505050565b6112fd565b806112e78161226f565b91505060025481106112fd576112cf8785611a96565b8415611317575f8781526004602052604090206006018290555b5050505f938452505060046020908152604083206007018054600181018255908452922090910180546001600160a01b0319166001600160a01b03909216919091179055565b5f5f5160206124835f395f51905f526113768484610a02565b6113f5575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556113ab3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106dc565b5f9150506106dc565b5f5f5160206124835f395f51905f526114178484610a02565b156113f5575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106dc565b61147f611b4e565b5f5160206124a35f395f51905f52805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a150565b306001600160a01b037f000000000000000000000000f1650c618c7056f8e5e1a879eb69749d4d652e7816148061155c57507f000000000000000000000000f1650c618c7056f8e5e1a879eb69749d4d652e786001600160a01b03166115505f5160206124635f395f51905f52546001600160a01b031690565b6001600160a01b031614155b1561157a5760405163703e46dd60e11b815260040160405180910390fd5b565b5f61080d81610ff8565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156115e0575060408051601f3d908101601f191682019092526115dd91810190612422565b60015b61160857604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610b53565b5f5160206124635f395f51905f52811461163857604051632a87526960e21b815260048101829052602401610b53565b6108668383611b7d565b306001600160a01b037f000000000000000000000000f1650c618c7056f8e5e1a879eb69749d4d652e78161461157a5760405163703e46dd60e11b815260040160405180910390fd5b6116936116d3565b5f5160206124a35f395f51905f52805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336114b8565b5f5160206124a35f395f51905f525460ff161561157a5760405163d93c066560e01b815260040160405180910390fd5b61157a611bd2565b611713611bd2565b61157a611c1b565b804710156117455760405163cf47918160e01b815247600482015260248101829052604401610b53565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f811461178e576040519150601f19603f3d011682016040523d82523d5f602084013e611793565b606091505b50509050806108665760405163d6bda27560e01b815260040160405180910390fd5b6117bf8282610a02565b61080d5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610b53565b5f82815260046020526040812080546001600160a01b0319168155906118176001830182611e18565b600282015f9055600382015f9055600482015f9055600582015f61183b9190611e4f565b600682015f9055600782015f6118519190611e4f565b505060a0810151515f5b81811015611a46575f805460a085015180516001600160a01b0390921691635c7449999190859081106118905761189061240e565b60200260200101516040518263ffffffff1660e01b81526004016118c391906001600160a01b0391909116815260200190565b602060405180830381865afa1580156118de573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119029190612422565b9050801561199c575f5460a085015180516001600160a01b039092169163c4d33f07918491869081106119375761193761240e565b60200260200101516040518363ffffffff1660e01b815260040161196e9291909182526001600160a01b0316602082015260400190565b5f604051808303815f87803b158015611985575f5ffd5b505af1158015611997573d5f5f3e3d5ffd5b505050505b606084015115611a3d575f54606085015160a086015180516001600160a01b03909316926366328a0a929190869081106119d8576119d861240e565b60200260200101516040518363ffffffff1660e01b8152600401611a0f9291909182526001600160a01b0316602082015260400190565b5f604051808303815f87803b158015611a26575f5ffd5b505af1158015611a38573d5f5f3e3d5ffd5b505050505b5060010161185b565b5060408201518251611a63916001600160a01b039091169061171b565b6040516001815283907f5a87909bff68caaaaf0b3fd9c74eeccc928832f879315e5c6fb7a73612f26c0c90602001610feb565b5f82815260046020526040812080546001600160a01b031916815590611abf6001830182611e18565b600282015f9055600382015f9055600482015f9055600582015f611ae39190611e4f565b600682015f9055600782015f611af99190611e4f565b5050806040015160035f828254611b109190612439565b90915550506040515f815282907f5a87909bff68caaaaf0b3fd9c74eeccc928832f879315e5c6fb7a73612f26c0c9060200160405180910390a25050565b5f5160206124a35f395f51905f525460ff1661157a57604051638dfc202b60e01b815260040160405180910390fd5b611b8682611c3b565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115611bca576108668282611c9e565b61080d611d10565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661157a57604051631afcd79f60e31b815260040160405180910390fd5b611c23611bd2565b5f5160206124a35f395f51905f52805460ff19169055565b806001600160a01b03163b5f03611c7057604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610b53565b5f5160206124635f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b031684604051611cba919061244c565b5f60405180830381855af49150503d805f8114611cf2576040519150601f19603f3d011682016040523d82523d5f602084013e611cf7565b606091505b5091509150611d07858383611d2f565b95945050505050565b341561157a5760405163b398979f60e01b815260040160405180910390fd5b606082611d4457611d3f82611d8e565b611d87565b8151158015611d5b57506001600160a01b0384163b155b15611d8457604051639996b31560e01b81526001600160a01b0385166004820152602401610b53565b50805b9392505050565b805115611d9e5780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b828054828255905f5260205f20908101928215611e08579160200282015b82811115611e085781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190611dd5565b50611e14929150611e66565b5090565b508054611e24906121f5565b5f825580601f10611e33575050565b601f0160209004905f5260205f209081019061089d9190611e66565b5080545f8255905f5260205f209081019061089d91905b5b80821115611e14575f8155600101611e67565b5f60208284031215611e8a575f5ffd5b81356001600160e01b031981168114611d87575f5ffd5b5f60208284031215611eb1575f5ffd5b5035919050565b602080825282518282018190525f918401906040840190835b81811015611ef85783516001600160a01b0316835260209384019390920191600101611ed1565b509095945050505050565b6001600160a01b038116811461089d575f5ffd5b5f5f60408385031215611f28575f5ffd5b823591506020830135611f3a81611f03565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215611f6a575f5ffd5b8235611f7581611f03565b9150602083013567ffffffffffffffff811115611f90575f5ffd5b8301601f81018513611fa0575f5ffd5b803567ffffffffffffffff811115611fba57611fba611f45565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611fe957611fe9611f45565b604052818152828201602001871015612000575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038716815260c0602082018190525f906120709083018861201f565b90508560408301528460608301528360808301528260a0830152979650505050505050565b602081525f611d87602083018461201f565b5f5f83601f8401126120b7575f5ffd5b50813567ffffffffffffffff8111156120ce575f5ffd5b6020830191508360208260051b85010111156120e8575f5ffd5b9250929050565b5f5f5f5f5f60608688031215612103575f5ffd5b85359450602086013567ffffffffffffffff811115612120575f5ffd5b8601601f81018813612130575f5ffd5b803567ffffffffffffffff811115612146575f5ffd5b886020828401011115612157575f5ffd5b60209190910194509250604086013567ffffffffffffffff81111561217a575f5ffd5b612186888289016120a7565b969995985093965092949392505050565b5f602082840312156121a7575f5ffd5b8135611d8781611f03565b5f5f5f5f608085870312156121c5575f5ffd5b84356121d081611f03565b935060208501356121e081611f03565b93969395505050506040820135916060013590565b600181811c9082168061220957607f821691505b60208210810361222757634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106dc576106dc61222d565b5f60208284031215612264575f5ffd5b8151611d8781611f03565b5f600182016122805761228061222d565b5060010190565b601f82111561086657805f5260205f20601f840160051c810160208510156122ac5750805b601f840160051c820191505b818110156122cb575f81556001016122b8565b5050505050565b67ffffffffffffffff8311156122ea576122ea611f45565b6122fe836122f883546121f5565b83612287565b5f601f84116001811461232f575f85156123185750838201355b5f19600387901b1c1916600186901b1783556122cb565b5f83815260208120601f198716915b8281101561235e578685013582556020948501946001909201910161233e565b508682101561237a575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b85815260606020820152836060820152838560808301375f60808583018101829052601f19601f8701168301838103820160408501529081018490528490829060a0015b858210156124015782356123e381611f03565b6001600160a01b0316815260209283019260019290920191016123d0565b9998505050505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612432575f5ffd5b5051919050565b808201808211156106dc576106dc61222d565b5f82518060208501845e5f92019182525091905056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800cd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300a26469706673582212205b921de487068c2589585918fe2907fd8bec76cbc5694fb7c25fe77e45bb861064736f6c634300081b0033

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.