ETH Price: $1,784.96 (+13.03%)

Contract

0xB057044a0859645a2339E1Af24A795E4be0BAC4b
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00
Transaction Hash
Method
Block
From
To
Claim My Contrac...19688312024-04-10 11:11:17377 days ago1712747477IN
0xB057044a...4be0BAC4b
0 ETH0.000000050.00086788
Late Reveal19566512024-04-10 4:25:17377 days ago1712723117IN
0xB057044a...4be0BAC4b
0 ETH0.000000070.00061454
Late Reveal19261102024-04-09 11:27:15378 days ago1712662035IN
0xB057044a...4be0BAC4b
0 ETH0.000000090.00078404
Late Reveal4124542024-03-05 10:32:03413 days ago1709634723IN
0xB057044a...4be0BAC4b
0 ETH0.000183181.50100076
Mint With Credit...3906402024-03-04 22:24:55414 days ago1709591095IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906382024-03-04 22:24:51414 days ago1709591091IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906362024-03-04 22:24:47414 days ago1709591087IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906342024-03-04 22:24:43414 days ago1709591083IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906322024-03-04 22:24:39414 days ago1709591079IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906302024-03-04 22:24:35414 days ago1709591075IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906282024-03-04 22:24:31414 days ago1709591071IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906272024-03-04 22:24:29414 days ago1709591069IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906252024-03-04 22:24:25414 days ago1709591065IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906232024-03-04 22:24:21414 days ago1709591061IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906212024-03-04 22:24:17414 days ago1709591057IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906192024-03-04 22:24:13414 days ago1709591053IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906172024-03-04 22:24:09414 days ago1709591049IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906152024-03-04 22:24:05414 days ago1709591045IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906102024-03-04 22:23:55414 days ago1709591035IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906082024-03-04 22:23:51414 days ago1709591031IN
0xB057044a...4be0BAC4b
0 ETH0.00001120.1
Mint With Credit...3906042024-03-04 22:23:43414 days ago1709591023IN
0xB057044a...4be0BAC4b
0 ETH0.000012910.1
Mint With Credit...3895822024-03-04 21:49:39414 days ago1709588979IN
0xB057044a...4be0BAC4b
0 ETH0.000000140.00128488
Late Reveal3894622024-03-04 21:45:39414 days ago1709588739IN
0xB057044a...4be0BAC4b
0 ETH0.000183041.50000027
Mint With Credit...3893112024-03-04 21:40:37414 days ago1709588437IN
0xB057044a...4be0BAC4b
0 ETH0.00000280.025
Late Reveal3891542024-03-04 21:35:23414 days ago1709588123IN
0xB057044a...4be0BAC4b
0 ETH0.000183041.50000025
View all transactions

Latest 1 internal transaction

Parent Transaction Hash Block From To
3010752024-03-02 20:39:25416 days ago1709411965
0xB057044a...4be0BAC4b
195.44 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Minter

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 19 : Minter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {IBlastRunners} from "./interfaces/IBlastRunners.sol";
import {IBusiness} from "./interfaces/IBusiness.sol";
import {ICredits} from "./interfaces/ICredits.sol";
import {IBlast} from "./interfaces/IBlast.sol";
import {IBlastPoints} from "./interfaces/IBlastPoints.sol";

/**
 * @title minter contract for the blastrunners game
 */
contract Minter is AccessControl {
    error Minter__CallerNotEOA();
    error Minter__InvalidPayment();
    error Minter__UserNotWhitelisted();
    error Minter__AlreadyMinted();
    error Minter__GenesisStillMinting();
    error Minter__GenesisMaxSupplyReached();
    error Minter__WhitelistMintNotOpen();
    error Minter__PublicMintNotOpen();
    error Minter__UserHasNotBoughtABusiness();
    error Minter__TokenNotMinted();
    error Minter__InvalidBlockHash();
    error Minter__InvalidSignature();
    error Minter__WithdrawalFailed();

    event BusinessBought(uint256 businessesCounter);

    using ECDSA for bytes32;
    using MessageHashUtils for bytes32;

    IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002);
    IBlastPoints public blastPoints;
    IBlastRunners public immutable blastrunners;
    IBusiness public immutable business;
    ICredits public immutable credits;

    bytes32 public merkleRoot;
    address public signer;

    bool public whitelistMintStatus;
    bool public publicMintStatus;

    uint256 public genesisMintPrice = 0.04 ether;
    uint256 public boughtBusinessesCounter;

    mapping(address user => bool minted) public userMinted;
    mapping(uint256 tokenId => uint256 mintBlock) public tokenMintBlock;
    mapping(uint256 boughtBusinessesCounter => uint256 mintBlock) public businessBoughtBlock;
    mapping(uint256 boughtBusinessesCounter => address buyer) public businessBuyer;
    mapping(address user => uint256[] boughtBusinessesCounters) public boughtBusinessesByUser;

    constructor(address _blastPointsAddress, address _pointsOperator, address _blastrunnersAdress, address _businessAddress, address _creditsAddress) {
        blastrunners = IBlastRunners(_blastrunnersAdress);
        business = IBusiness(_businessAddress);
        credits = ICredits(_creditsAddress);

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);

        // contract will be able to claim gas fees
        BLAST.configureClaimableGas();

        // configure contract to be able to distribute blast points back to stakers/LPers
        IBlastPoints(_blastPointsAddress).configurePointsOperator(_pointsOperator);
    }

    modifier onlyEOA() {
        if (msg.sender != tx.origin) {
            revert Minter__CallerNotEOA();
        }
        _;
    }

    receive() external payable {}

    /**
     * @notice mint function for genesis mint
     */
    function mintGenesis(bytes32[] calldata _merkleProof) external payable onlyEOA {
        if (!whitelistMintStatus) {
            revert Minter__WhitelistMintNotOpen();
        }

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));

        if (msg.value != genesisMintPrice) {
            revert Minter__InvalidPayment();
        }

        if (!MerkleProof.verify(_merkleProof, merkleRoot, leaf)) {
            revert Minter__UserNotWhitelisted();
        }

        if (userMinted[msg.sender]) {
            revert Minter__AlreadyMinted();
        }

        if (blastrunners.minted() + 1 > blastrunners.PAID_TOKENS()) {
            revert Minter__GenesisMaxSupplyReached();
        }

        _executeMint();
    }

    /**
     * @notice public mint function for genesis mint
     * @notice admin has to set public mint status to true otherwise will revert
     */
    function mintGenesisPublic() external payable onlyEOA {
        if (!publicMintStatus) {
            revert Minter__PublicMintNotOpen();
        }

        if (msg.value != genesisMintPrice) {
            revert Minter__InvalidPayment();
        }

        if (blastrunners.minted() + 1 > blastrunners.PAID_TOKENS()) {
            revert Minter__GenesisMaxSupplyReached();
        }

        _executeMint();
    }

    /**
     * @notice worker/edgerunner mint function for second phase of the game
     */
    function mintWithCredits() external onlyEOA {
        if (blastrunners.minted() + 1 <= blastrunners.PAID_TOKENS()) {
            revert Minter__GenesisStillMinting();
        }

        uint256 cost = calculateGen1Cost();

        credits.burn(msg.sender, cost);

        _executeMint();
    }

    /**
     * @notice buy function to buy a business for second phase of game
     */
    function buyBusiness() external onlyEOA returns (uint256) {
        if (blastrunners.minted() < blastrunners.PAID_TOKENS()) {
            revert Minter__GenesisStillMinting();
        }

        ++boughtBusinessesCounter;

        businessBoughtBlock[boughtBusinessesCounter] = block.number;
        businessBuyer[boughtBusinessesCounter] = msg.sender;
        boughtBusinessesByUser[msg.sender].push(boughtBusinessesCounter);

        uint256 cost = calculateBusinessCost();

        credits.burn(msg.sender, cost);

        emit BusinessBought(boughtBusinessesCounter);

        return boughtBusinessesCounter;
    }

    /**
     * @notice claim function to claim/mint a business that was previously bought by the user
     */
    function mintBusiness(uint256 _boughtBusinessesCounter) external onlyEOA {
        if (businessBuyer[_boughtBusinessesCounter] != msg.sender) {
            revert Minter__UserHasNotBoughtABusiness();
        }

        delete businessBuyer[_boughtBusinessesCounter];

        uint256 targetBlock = _retrieveBusinessBoughtBlock(_boughtBusinessesCounter);

        if (targetBlock == 0) {
            revert Minter__UserHasNotBoughtABusiness();
        }

        bytes32 targetBlockHash = blockhash(targetBlock);

        if (targetBlockHash == bytes32(0)) {
            revert Minter__InvalidBlockHash();
        }

        uint256 seed = uint256(targetBlockHash);

        business.mint(msg.sender, seed);
    }

    /**
     * @notice claim function to claim/mint a business that was previously bought by the user but recent 256 blocks have already passed
     */
    function lateMintBusiness(uint256 _boughtBusinessesCounter, bytes32 _targetBlockHash, bytes memory _signature)
        external
        onlyEOA
    {
        uint256 targetBlock = _retrieveBusinessBoughtBlock(_boughtBusinessesCounter);

        bytes32 hashData = keccak256(abi.encodePacked(targetBlock, _targetBlockHash));

        if (hashData.toEthSignedMessageHash().recover(_signature) != signer) {
            revert Minter__InvalidSignature();
        }

        uint256 seed = uint256(_targetBlockHash);

        business.mint(msg.sender, seed);
    }

    /**
     * @notice external reveal function to reveal a single token
     * @param _tokenId tokenId of the token to reveal
     */
    function reveal(uint256 _tokenId) external onlyEOA {
        uint256 targetBlock = _retrieveMintBlock(_tokenId);
        bytes32 targetBlockHash = blockhash(targetBlock);

        if (targetBlockHash == bytes32(0)) {
            revert Minter__InvalidBlockHash();
        }

        _executeReveal(_tokenId, targetBlockHash);
    }

    /**
     * @notice external reveal function to reveal a single token but latest 256 blocks have already passed
     * @param _tokenId tokenId of the token to reveal
     */
    function lateReveal(uint256 _tokenId, bytes32 _targetBlockHash, bytes memory _signature) external onlyEOA {
        uint256 targetBlock = _retrieveMintBlock(_tokenId);

        bytes32 hashData = keccak256(abi.encodePacked(targetBlock, _targetBlockHash));

        if (hashData.toEthSignedMessageHash().recover(_signature) != signer) {
            revert Minter__InvalidSignature();
        }

        _executeReveal(_tokenId, _targetBlockHash);
    }

    /**
     * @notice admin setter function to set the merkle root
     * @param _merkleRoot merkle root of the merkle tree
     */
    function setMerkleRoot(bytes32 _merkleRoot) external onlyRole(DEFAULT_ADMIN_ROLE) {
        merkleRoot = _merkleRoot;
    }

    /**
     * @notice admin setter function to set the signer
     * @param _signer new signer adddress
     */
    function setSigner(address _signer) external onlyRole(DEFAULT_ADMIN_ROLE) {
        signer = _signer;
    }

    /**
     * @notice admin setter function to set the price for the genesis mint
     * @param _newGenesisMintPrice new price of the genesis mint
     */
    function setMintPrice(uint256 _newGenesisMintPrice) external onlyRole(DEFAULT_ADMIN_ROLE) {
        genesisMintPrice = _newGenesisMintPrice;
    }

    /**
     * @notice admin setter function to set the whitelist mint status
     * @param _status whitelist mint status
     */
    function setWhitelistMintStatus(bool _status) external onlyRole(DEFAULT_ADMIN_ROLE) {
        whitelistMintStatus = _status;
    }

    /**
     * @notice admin setter function to set the public mint status
     * @param _status public mint status
     */
    function setPublicMintStatus(bool _status) external onlyRole(DEFAULT_ADMIN_ROLE) {
        publicMintStatus = _status;
    }

    /**
     * @notice claim gas fees spent on this contract
     */
    function claimMyContractsGas() external onlyRole(DEFAULT_ADMIN_ROLE) {
        BLAST.claimAllGas(address(this), msg.sender);
    }

    /**
     * @notice admin withdraw function
     */
    function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) {
        (bool sent,) = payable(msg.sender).call{value: address(this).balance}("");
        if (!sent) {
            revert Minter__WithdrawalFailed();
        }
    }

    /**
     * @notice returns the cost of the next worker/edgerunner mint based on the minted supply
     */
    function calculateGen1Cost() public view returns (uint256) {
        uint256 tokenId = blastrunners.minted() + 1;

        if (tokenId <= 6000) return 6000 ether;
        if (tokenId <= 7000) return 7000 ether;
        if (tokenId <= 8000) return 8000 ether;
        if (tokenId <= 9000) return 9000 ether;
        if (tokenId <= 10000) return 10000 ether;
        if (tokenId <= 11000) return 12500 ether;
        if (tokenId <= 12000) return 15000 ether;
        if (tokenId <= 13000) return 17500 ether;
        if (tokenId <= 14000) return 20000 ether;
        if (tokenId <= 15000) return 22500 ether;
        if (tokenId <= 16000) return 25000 ether;
        if (tokenId <= 17000) return 30000 ether;
        if (tokenId <= 18000) return 32500 ether;
        if (tokenId <= 19000) return 35000 ether;
        if (tokenId <= 20000) return 40000 ether;
        if (tokenId <= 21000) return 42500 ether;
        if (tokenId <= 22000) return 45000 ether;
        if (tokenId <= 23000) return 50000 ether;
        if (tokenId <= 24000) return 52500 ether;
        if (tokenId <= 25000) return 55000 ether;
    }

    /**
     * @notice returns the cost of the next business mint based on the minted supply
     */
    function calculateBusinessCost() public view returns (uint256) {
        uint256 tokenId = business.minted() + 1;

        if (tokenId <= 500) return 6000 ether;
        if (tokenId <= 1000) return 12000 ether;
        if (tokenId <= 2000) return 15000 ether;
        if (tokenId <= 3000) return 20000 ether;
        if (tokenId <= 4000) return 25000 ether;
        if (tokenId <= 5000) return 30000 ether;
        if (tokenId <= 6000) return 35000 ether;
        if (tokenId <= 7000) return 40000 ether;
        if (tokenId <= 8000) return 45000 ether;
        if (tokenId <= 9000) return 50000 ether;
        if (tokenId <= 10000) return 55000 ether;
    }

    function _executeMint() internal {
        uint256 tokenId = blastrunners.mint(msg.sender);
        tokenMintBlock[tokenId] = block.number;
        userMinted[msg.sender] = true;
    }

    function _executeReveal(uint256 _tokenId, bytes32 _blockhash) internal {
        uint256 seed = uint256(_blockhash);
        blastrunners.reveal(_tokenId, seed);
    }

    function _retrieveMintBlock(uint256 _tokenId) internal view returns (uint256 blockNumber) {
        blockNumber = tokenMintBlock[_tokenId];

        if (blockNumber == 0) {
            revert Minter__TokenNotMinted();
        }
    }

    function _retrieveBusinessBoughtBlock(uint256 _boughtBusinessesCounter)
        internal
        view
        returns (uint256 blockNumber)
    {
        blockNumber = businessBoughtBlock[_boughtBusinessesCounter];

        if (blockNumber == 0) {
            revert Minter__UserHasNotBoughtABusiness();
        }
    }
}

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

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.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 AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

    /**
     * @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) {
        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) {
        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 {
        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) {
        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) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 3 of 19 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 4 of 19 : MessageHashUtils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
 *
 * The library provides methods for generating a hash of a message that conforms to the
 * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
 * specifications.
 */
library MessageHashUtils {
    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing a bytes32 `messageHash` with
     * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
     * keccak256, although any bytes32 value can be safely used because the final digest will
     * be re-hashed.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
        }
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing an arbitrary `message` with
     * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
        return
            keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x00` (data with intended validator).
     *
     * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
     * `validator` address. Then hashing the result.
     *
     * See {ECDSA-recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(hex"19_00", validator, data));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
     *
     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
     * `\x19\x01` and hashing the result. It corresponds to the hash signed by the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
     *
     * See {ECDSA-recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, hex"19_01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            digest := keccak256(ptr, 0x42)
        }
    }
}

File 5 of 19 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

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

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

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

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

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

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

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

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

        return (signer, RecoverError.NoError, bytes32(0));
    }

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

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

File 6 of 19 : IBlastRunners.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";

interface IBlastRunners is IERC721, IAccessControl {
    enum NftType {
        BOSS,
        EDGERUNNER,
        WORKER
    }

    function PAID_TOKENS() external view returns (uint256);
    function MAX_TOKENS() external view returns (uint256);

    function minted() external view returns (uint256);
    function unknownMinted() external view returns (uint256);
    function bossMinted() external view returns (uint256);
    function edgeRunnerMinted() external view returns (uint256);
    function workerMinted() external view returns (uint256);

    function isRevealed(uint256 tokenId) external view returns (bool);
    function getNftType(uint256 _tokenId) external view returns (NftType);

    function mint(address to) external returns (uint256);
    function reveal(uint256 _tokenId, uint256 _seed) external;
    function isBoss(uint256 _tokenid) external view returns (bool);
}

File 7 of 19 : IBusiness.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IBusiness is IERC721 {
    function minted() external view returns (uint256);

    function mint(address _to, uint256 _seed) external;
}

File 8 of 19 : ICredits.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ICredits is IERC20 {
    function mint(address to, uint256 amount) external;

    function burn(address from, uint256 amount) external;
}

File 9 of 19 : IBlast.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IBlast {
    function configureClaimableGas() external;
    function claimAllGas(address contractAddress, address recipient) external returns (uint256);
}

File 10 of 19 : IBlastPoints.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IBlastPoints {
    function configurePointsOperator(address operator) external;
}

File 11 of 19 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 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, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

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

    /**
     * @dev 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 12 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

File 13 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

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

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

File 14 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

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

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

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

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

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

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

File 15 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 16 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

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

pragma solidity ^0.8.20;

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

File 18 of 19 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

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

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

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

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 19 of 19 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_blastPointsAddress","type":"address"},{"internalType":"address","name":"_pointsOperator","type":"address"},{"internalType":"address","name":"_blastrunnersAdress","type":"address"},{"internalType":"address","name":"_businessAddress","type":"address"},{"internalType":"address","name":"_creditsAddress","type":"address"}],"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":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"Minter__AlreadyMinted","type":"error"},{"inputs":[],"name":"Minter__CallerNotEOA","type":"error"},{"inputs":[],"name":"Minter__GenesisMaxSupplyReached","type":"error"},{"inputs":[],"name":"Minter__GenesisStillMinting","type":"error"},{"inputs":[],"name":"Minter__InvalidBlockHash","type":"error"},{"inputs":[],"name":"Minter__InvalidPayment","type":"error"},{"inputs":[],"name":"Minter__InvalidSignature","type":"error"},{"inputs":[],"name":"Minter__PublicMintNotOpen","type":"error"},{"inputs":[],"name":"Minter__TokenNotMinted","type":"error"},{"inputs":[],"name":"Minter__UserHasNotBoughtABusiness","type":"error"},{"inputs":[],"name":"Minter__UserNotWhitelisted","type":"error"},{"inputs":[],"name":"Minter__WhitelistMintNotOpen","type":"error"},{"inputs":[],"name":"Minter__WithdrawalFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"businessesCounter","type":"uint256"}],"name":"BusinessBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastPoints","outputs":[{"internalType":"contract IBlastPoints","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastrunners","outputs":[{"internalType":"contract IBlastRunners","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"boughtBusinessesByUser","outputs":[{"internalType":"uint256","name":"boughtBusinessesCounters","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boughtBusinessesCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"business","outputs":[{"internalType":"contract IBusiness","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boughtBusinessesCounter","type":"uint256"}],"name":"businessBoughtBlock","outputs":[{"internalType":"uint256","name":"mintBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boughtBusinessesCounter","type":"uint256"}],"name":"businessBuyer","outputs":[{"internalType":"address","name":"buyer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyBusiness","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"calculateBusinessCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateGen1Cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimMyContractsGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"credits","outputs":[{"internalType":"contract ICredits","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_boughtBusinessesCounter","type":"uint256"},{"internalType":"bytes32","name":"_targetBlockHash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"lateMintBusiness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes32","name":"_targetBlockHash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"lateReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_boughtBusinessesCounter","type":"uint256"}],"name":"mintBusiness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintGenesis","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintGenesisPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintWithCredits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"publicMintStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"reveal","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":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newGenesisMintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setPublicMintStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setWhitelistMintStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenMintBlock","outputs":[{"internalType":"uint256","name":"mintBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userMinted","outputs":[{"internalType":"bool","name":"minted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e0604052668e1bc9bf0400006004553480156200001c57600080fd5b506040516200265d3803806200265d8339810160408190526200003f9162000203565b6001600160a01b0380841660805282811660a052811660c0526200006560003362000137565b507343000000000000000000000000000000000000026001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620000b657600080fd5b505af1158015620000cb573d6000803e3d6000fd5b50506040516336b91f2b60e01b81526001600160a01b038781166004830152881692506336b91f2b9150602401600060405180830381600087803b1580156200011357600080fd5b505af115801562000128573d6000803e3d6000fd5b50505050505050505062000273565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16620001dc576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620001933390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001e0565b5060005b92915050565b80516001600160a01b0381168114620001fe57600080fd5b919050565b600080600080600060a086880312156200021c57600080fd5b6200022786620001e6565b94506200023760208701620001e6565b93506200024760408701620001e6565b92506200025760608701620001e6565b91506200026760808701620001e6565b90509295509295909350565b60805160a05160c05161234a620003136000396000818161037b01528181610d7c01526110660152600081816106f40152818161093601528181610a5701526115f40152600081816104dd01528181610c2801528181610caa01528181610eb601528181610f380152818161138c0152818161140e015281816116f1015281816117730152818161182c01528181611c500152611d40015261234a6000f3fe60806040526004361061023f5760003560e01c80636c2fc7b71161012e578063bf54a71e116100ab578063dbac08771161006f578063dbac0877146106da578063e74dc11c146106e2578063f191986914610716578063f4a0a5281461072b578063f8e628f31461074b57600080fd5b8063bf54a71e14610646578063c2ca0ac514610659578063ca4f422c14610679578063cb9fe58614610699578063d547741f146106ba57600080fd5b806391d14854116100f257806391d14854146105b657806397d75776146105d6578063a217fddf146105f1578063b2bd6b5014610606578063b61ff93c1461062657600080fd5b80636c2fc7b71461051f57806377d5d2dc1461054c5780637bdfbccf146105615780637cb64759146105765780638b677d961461059657600080fd5b806330fd20e2116101bc578063494df0f411610180578063494df0f41461048b5780635020170a146104a157806357f64cb4146104b657806365560f96146104cb5780636c19e783146104ff57600080fd5b806330fd20e2146103f357806336568abe146104135780633ccfd60b146104335780633f79846614610448578063413234ad1461047557600080fd5b80632620237011610203578063262023701461034857806326540fd2146103695780632adeb3081461039d5780632eb4a7ab146103bd5780632f2ff15d146103d357600080fd5b806301ffc9a71461024b5780630e1b3022146102805780631aa5e872146102a2578063238ac933146102d2578063248a9ca31461030a57600080fd5b3661024657005b600080fd5b34801561025757600080fd5b5061026b610266366004612051565b610781565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b36600461207b565b6107b8565b005b3480156102ae57600080fd5b5061026b6102bd3660046120b4565b60066020526000908152604090205460ff1681565b3480156102de57600080fd5b506003546102f2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561031657600080fd5b5061033a6103253660046120cf565b60009081526020819052604090206001015490565b604051908152602001610277565b34801561035457600080fd5b5060035461026b90600160a81b900460ff1681565b34801561037557600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156103a957600080fd5b5061033a6103b83660046120e8565b6107e2565b3480156103c957600080fd5b5061033a60025481565b3480156103df57600080fd5b506102a06103ee366004612112565b610813565b3480156103ff57600080fd5b506102a061040e366004612154565b61083e565b34801561041f57600080fd5b506102a061042e366004612112565b6109a2565b34801561043f57600080fd5b506102a06109da565b34801561045457600080fd5b5061033a6104633660046120cf565b60076020526000908152604090205481565b34801561048157600080fd5b5061033a60045481565b34801561049757600080fd5b5061033a60055481565b3480156104ad57600080fd5b5061033a610a52565b3480156104c257600080fd5b506102a0610c06565b3480156104d757600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b34801561050b57600080fd5b506102a061051a3660046120b4565b610deb565b34801561052b57600080fd5b5061033a61053a3660046120cf565b60086020526000908152604090205481565b34801561055857600080fd5b506102a0610e19565b34801561056d57600080fd5b5061033a610e92565b34801561058257600080fd5b506102a06105913660046120cf565b61110d565b3480156105a257600080fd5b506102a06105b1366004612154565b61111e565b3480156105c257600080fd5b5061026b6105d1366004612112565b611203565b3480156105e257600080fd5b506102f26002604360981b0181565b3480156105fd57600080fd5b5061033a600081565b34801561061257600080fd5b506001546102f2906001600160a01b031681565b34801561063257600080fd5b506102a061064136600461207b565b61122c565b6102a0610654366004612218565b611256565b34801561066557600080fd5b506102a06106743660046120cf565b6114c0565b34801561068557600080fd5b506102a06106943660046120cf565b611517565b3480156106a557600080fd5b5060035461026b90600160a01b900460ff1681565b3480156106c657600080fd5b506102a06106d5366004612112565b61165e565b6102a0611683565b3480156106ee57600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b34801561072257600080fd5b5061033a611827565b34801561073757600080fd5b506102a06107463660046120cf565b611ac1565b34801561075757600080fd5b506102f26107663660046120cf565b6009602052600090815260409020546001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b14806107b257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006107c381611ad2565b5060038054911515600160a01b0260ff60a01b19909216919091179055565b600a60205281600052604060002081815481106107fe57600080fd5b90600052602060002001600091509150505481565b60008281526020819052604090206001015461082e81611ad2565b6108388383611adc565b50505050565b33321461085e576040516313941d1960e11b815260040160405180910390fd5b600061086984611b6e565b905060008184604051602001610889929190918252602082015260400190565b60408051601f1981840301815291905280516020909101206003549091506001600160a01b03166108f1846108eb847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90611ba3565b6001600160a01b0316146109185760405163b85d0a9160e01b815260040160405180910390fd5b6040516340c10f1960e01b81523360048201526024810185905284907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b15801561098257600080fd5b505af1158015610996573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03811633146109cb5760405163334bd91960e11b815260040160405180910390fd5b6109d58282611bcd565b505050565b60006109e581611ad2565b604051600090339047908381818185875af1925050503d8060008114610a27576040519150601f19603f3d011682016040523d82523d6000602084013e610a2c565b606091505b5050905080610a4e57604051630334edb960e41b815260040160405180910390fd5b5050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad7919061228d565b610ae29060016122bc565b90506101f48111610afe5769014542ba12a337c0000091505090565b6103e88111610b185769028a857425466f80000091505090565b6107d08111610b325769032d26d12e980b60000091505090565b610bb88111610b4c5769043c33c193756480000091505090565b610fa08111610b665769054b40b1f852bda0000091505090565b6113888111610b805769065a4da25d3016c0000091505090565b6117708111610b9a576907695a92c20d6fe0000091505090565b611b588111610bb457690878678326eac900000091505090565b611f408111610bce5769098774738bc82220000091505090565b6123288111610be857690a968163f0a57b40000091505090565b6127108111610c0257690ba58e545582d460000091505090565b5090565b333214610c26576040516313941d1960e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca8919061228d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a919061228d565b610d359060016122bc565b11610d53576040516326d727a160e21b815260040160405180910390fd5b6000610d5d611827565b604051632770a7eb60e21b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dc29fac90604401600060405180830381600087803b158015610dc857600080fd5b505af1158015610ddc573d6000803e3d6000fd5b50505050610de8611c38565b50565b6000610df681611ad2565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e2481611ad2565b604051634aa7d2f760e11b81523060048201523360248201526002604360981b019063954fa5ee906044016020604051808303816000875af1158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e919061228d565b6000333214610eb4576040516313941d1960e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f36919061228d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb8919061228d565b1015610fd7576040516326d727a160e21b815260040160405180910390fd5b600560008154610fe6906122cf565b90915550600580546000908152600860209081526040808320439055835483526009825280832080546001600160a01b031916339081179091558352600a825282209254835460018101855593835290822090920191909155611047610a52565b604051632770a7eb60e21b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156110b257600080fd5b505af11580156110c6573d6000803e3d6000fd5b505050507f4a70c8064c4fcfe4bcb8b91338773626c2bbde76557cb26643853568fb96c19c6005546040516110fd91815260200190565b60405180910390a1505060055490565b600061111881611ad2565b50600255565b33321461113e576040516313941d1960e11b815260040160405180910390fd5b600061114984611cf1565b905060008184604051602001611169929190918252602082015260400190565b60408051601f1981840301815291905280516020909101206003549091506001600160a01b03166111cb846108eb847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b6001600160a01b0316146111f25760405163b85d0a9160e01b815260040160405180910390fd5b6111fc8585611d21565b5050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600061123781611ad2565b5060038054911515600160a81b0260ff60a81b19909216919091179055565b333214611276576040516313941d1960e11b815260040160405180910390fd5b600354600160a01b900460ff166112a057604051632515260560e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905060045434146112fb57604051631ef62ee960e01b815260040160405180910390fd5b61133c838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050611da9565b6113595760405163cdf1b4e160e01b815260040160405180910390fd5b3360009081526006602052604090205460ff161561138a576040516390e6791960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140c919061228d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa15801561146a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148e919061228d565b6114999060016122bc565b11156114b857604051630ecf3ff160e01b815260040160405180910390fd5b6109d5611c38565b3332146114e0576040516313941d1960e11b815260040160405180910390fd5b60006114eb82611cf1565b905080408061150d5760405163675aa04560e11b815260040160405180910390fd5b6109d58382611d21565b333214611537576040516313941d1960e11b815260040160405180910390fd5b6000818152600960205260409020546001600160a01b0316331461156e576040516346e5ad4760e01b815260040160405180910390fd5b600081815260096020526040812080546001600160a01b031916905561159382611b6e565b9050806000036115b6576040516346e5ad4760e01b815260040160405180910390fd5b8040806115d65760405163675aa04560e11b815260040160405180910390fd5b6040516340c10f1960e01b81523360048201526024810182905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f1990604401600060405180830381600087803b15801561164057600080fd5b505af1158015611654573d6000803e3d6000fd5b5050505050505050565b60008281526020819052604090206001015461167981611ad2565b6108388383611bcd565b3332146116a3576040516313941d1960e11b815260040160405180910390fd5b600354600160a81b900460ff166116cd5760405163019570d760e11b815260040160405180910390fd5b60045434146116ef57604051631ef62ee960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa15801561174d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611771919061228d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f3919061228d565b6117fe9060016122bc565b111561181d57604051630ecf3ff160e01b815260040160405180910390fd5b611825611c38565b565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015611888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ac919061228d565b6118b79060016122bc565b905061177081116118d35769014542ba12a337c0000091505090565b611b5881116118ed5769017b7883c0691660000091505090565b611f408111611907576901b1ae4d6e2ef500000091505090565b6123288111611921576901e7e4171bf4d3a0000091505090565b612710811161193b5769021e19e0c9bab240000091505090565b612af88111611955576902a5a058fc295ed0000091505090565b612ee0811161196f5769032d26d12e980b60000091505090565b6132c88111611989576903b4ad496106b7f0000091505090565b6136b081116119a35769043c33c193756480000091505090565b613a9881116119bd576904c3ba39c5e41110000091505090565b613e8081116119d75769054b40b1f852bda0000091505090565b61426881116119f15769065a4da25d3016c0000091505090565b6146508111611a0b576906e1d41a8f9ec350000091505090565b614a388111611a25576907695a92c20d6fe0000091505090565b614e208111611a3f57690878678326eac900000091505090565b6152088111611a59576908ffedfb59597590000091505090565b6155f08111611a735769098774738bc82220000091505090565b6159d88111611a8d57690a968163f0a57b40000091505090565b615dc08111611aa757690b1e07dc231427d0000091505090565b6161a88111610c0257690ba58e545582d460000091505090565b6000611acc81611ad2565b50600455565b610de88133611dbf565b6000611ae88383611203565b611b66576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055611b1e3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016107b2565b5060006107b2565b60008181526008602052604081205490819003611b9e576040516346e5ad4760e01b815260040160405180910390fd5b919050565b600080600080611bb38686611dfd565b925092509250611bc38282611e4a565b5090949350505050565b6000611bd98383611203565b15611b66576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016107b2565b6040516335313c2160e11b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636a627842906024016020604051808303816000875af1158015611ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc5919061228d565b600090815260076020908152604080832043905533835260069091529020805460ff1916600117905550565b60008181526007602052604081205490819003611b9e57604051635c7a535d60e11b815260040160405180910390fd5b604051639348cef760e01b8152600481018390526024810182905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639348cef790604401600060405180830381600087803b158015611d8c57600080fd5b505af1158015611da0573d6000803e3d6000fd5b50505050505050565b600082611db68584611f03565b14949350505050565b611dc98282611203565b610a4e5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044015b60405180910390fd5b60008060008351604103611e375760208401516040850151606086015160001a611e2988828585611f50565b955095509550505050611e43565b50508151600091506002905b9250925092565b6000826003811115611e5e57611e5e6122e8565b03611e67575050565b6001826003811115611e7b57611e7b6122e8565b03611e995760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611ead57611ead6122e8565b03611ece5760405163fce698f760e01b815260048101829052602401611df4565b6003826003811115611ee257611ee26122e8565b03610a4e576040516335e2f38360e21b815260048101829052602401611df4565b600081815b8451811015611f4857611f3482868381518110611f2757611f276122fe565b602002602001015161201f565b915080611f40816122cf565b915050611f08565b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611f8b5750600091506003905082612015565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611fdf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661200b57506000925060019150829050612015565b9250600091508190505b9450945094915050565b600081831061203b57600082815260208490526040902061204a565b60008381526020839052604090205b9392505050565b60006020828403121561206357600080fd5b81356001600160e01b03198116811461204a57600080fd5b60006020828403121561208d57600080fd5b8135801515811461204a57600080fd5b80356001600160a01b0381168114611b9e57600080fd5b6000602082840312156120c657600080fd5b61204a8261209d565b6000602082840312156120e157600080fd5b5035919050565b600080604083850312156120fb57600080fd5b6121048361209d565b946020939093013593505050565b6000806040838503121561212557600080fd5b823591506121356020840161209d565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561216957600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561218f57600080fd5b818601915086601f8301126121a357600080fd5b8135818111156121b5576121b561213e565b604051601f8201601f19908116603f011681019083821181831017156121dd576121dd61213e565b816040528281528960208487010111156121f657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806020838503121561222b57600080fd5b823567ffffffffffffffff8082111561224357600080fd5b818501915085601f83011261225757600080fd5b81358181111561226657600080fd5b8660208260051b850101111561227b57600080fd5b60209290920196919550909350505050565b60006020828403121561229f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156107b2576107b26122a6565b6000600182016122e1576122e16122a6565b5060010190565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea26469706673582212208b6c57eb0884d2761d499ae1e1a7bd09ce3caa01ac9bf79608439801f94eed5364736f6c634300081400330000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800000000000000000000000000a82eb14d67dd9f0e9fda72e1a85e7d6f3c4c616d000000000000000000000000d641dde60985fab88c623188adba6be3148288d900000000000000000000000007fd77f6a74675501564f9d6ece327a0909b3757000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf

Deployed Bytecode

0x60806040526004361061023f5760003560e01c80636c2fc7b71161012e578063bf54a71e116100ab578063dbac08771161006f578063dbac0877146106da578063e74dc11c146106e2578063f191986914610716578063f4a0a5281461072b578063f8e628f31461074b57600080fd5b8063bf54a71e14610646578063c2ca0ac514610659578063ca4f422c14610679578063cb9fe58614610699578063d547741f146106ba57600080fd5b806391d14854116100f257806391d14854146105b657806397d75776146105d6578063a217fddf146105f1578063b2bd6b5014610606578063b61ff93c1461062657600080fd5b80636c2fc7b71461051f57806377d5d2dc1461054c5780637bdfbccf146105615780637cb64759146105765780638b677d961461059657600080fd5b806330fd20e2116101bc578063494df0f411610180578063494df0f41461048b5780635020170a146104a157806357f64cb4146104b657806365560f96146104cb5780636c19e783146104ff57600080fd5b806330fd20e2146103f357806336568abe146104135780633ccfd60b146104335780633f79846614610448578063413234ad1461047557600080fd5b80632620237011610203578063262023701461034857806326540fd2146103695780632adeb3081461039d5780632eb4a7ab146103bd5780632f2ff15d146103d357600080fd5b806301ffc9a71461024b5780630e1b3022146102805780631aa5e872146102a2578063238ac933146102d2578063248a9ca31461030a57600080fd5b3661024657005b600080fd5b34801561025757600080fd5b5061026b610266366004612051565b610781565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b36600461207b565b6107b8565b005b3480156102ae57600080fd5b5061026b6102bd3660046120b4565b60066020526000908152604090205460ff1681565b3480156102de57600080fd5b506003546102f2906001600160a01b031681565b6040516001600160a01b039091168152602001610277565b34801561031657600080fd5b5061033a6103253660046120cf565b60009081526020819052604090206001015490565b604051908152602001610277565b34801561035457600080fd5b5060035461026b90600160a81b900460ff1681565b34801561037557600080fd5b506102f27f000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf81565b3480156103a957600080fd5b5061033a6103b83660046120e8565b6107e2565b3480156103c957600080fd5b5061033a60025481565b3480156103df57600080fd5b506102a06103ee366004612112565b610813565b3480156103ff57600080fd5b506102a061040e366004612154565b61083e565b34801561041f57600080fd5b506102a061042e366004612112565b6109a2565b34801561043f57600080fd5b506102a06109da565b34801561045457600080fd5b5061033a6104633660046120cf565b60076020526000908152604090205481565b34801561048157600080fd5b5061033a60045481565b34801561049757600080fd5b5061033a60055481565b3480156104ad57600080fd5b5061033a610a52565b3480156104c257600080fd5b506102a0610c06565b3480156104d757600080fd5b506102f27f000000000000000000000000d641dde60985fab88c623188adba6be3148288d981565b34801561050b57600080fd5b506102a061051a3660046120b4565b610deb565b34801561052b57600080fd5b5061033a61053a3660046120cf565b60086020526000908152604090205481565b34801561055857600080fd5b506102a0610e19565b34801561056d57600080fd5b5061033a610e92565b34801561058257600080fd5b506102a06105913660046120cf565b61110d565b3480156105a257600080fd5b506102a06105b1366004612154565b61111e565b3480156105c257600080fd5b5061026b6105d1366004612112565b611203565b3480156105e257600080fd5b506102f26002604360981b0181565b3480156105fd57600080fd5b5061033a600081565b34801561061257600080fd5b506001546102f2906001600160a01b031681565b34801561063257600080fd5b506102a061064136600461207b565b61122c565b6102a0610654366004612218565b611256565b34801561066557600080fd5b506102a06106743660046120cf565b6114c0565b34801561068557600080fd5b506102a06106943660046120cf565b611517565b3480156106a557600080fd5b5060035461026b90600160a01b900460ff1681565b3480156106c657600080fd5b506102a06106d5366004612112565b61165e565b6102a0611683565b3480156106ee57600080fd5b506102f27f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b375781565b34801561072257600080fd5b5061033a611827565b34801561073757600080fd5b506102a06107463660046120cf565b611ac1565b34801561075757600080fd5b506102f26107663660046120cf565b6009602052600090815260409020546001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b14806107b257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006107c381611ad2565b5060038054911515600160a01b0260ff60a01b19909216919091179055565b600a60205281600052604060002081815481106107fe57600080fd5b90600052602060002001600091509150505481565b60008281526020819052604090206001015461082e81611ad2565b6108388383611adc565b50505050565b33321461085e576040516313941d1960e11b815260040160405180910390fd5b600061086984611b6e565b905060008184604051602001610889929190918252602082015260400190565b60408051601f1981840301815291905280516020909101206003549091506001600160a01b03166108f1846108eb847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90611ba3565b6001600160a01b0316146109185760405163b85d0a9160e01b815260040160405180910390fd5b6040516340c10f1960e01b81523360048201526024810185905284907f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37576001600160a01b0316906340c10f1990604401600060405180830381600087803b15801561098257600080fd5b505af1158015610996573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03811633146109cb5760405163334bd91960e11b815260040160405180910390fd5b6109d58282611bcd565b505050565b60006109e581611ad2565b604051600090339047908381818185875af1925050503d8060008114610a27576040519150601f19603f3d011682016040523d82523d6000602084013e610a2c565b606091505b5050905080610a4e57604051630334edb960e41b815260040160405180910390fd5b5050565b6000807f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37576001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad7919061228d565b610ae29060016122bc565b90506101f48111610afe5769014542ba12a337c0000091505090565b6103e88111610b185769028a857425466f80000091505090565b6107d08111610b325769032d26d12e980b60000091505090565b610bb88111610b4c5769043c33c193756480000091505090565b610fa08111610b665769054b40b1f852bda0000091505090565b6113888111610b805769065a4da25d3016c0000091505090565b6117708111610b9a576907695a92c20d6fe0000091505090565b611b588111610bb457690878678326eac900000091505090565b611f408111610bce5769098774738bc82220000091505090565b6123288111610be857690a968163f0a57b40000091505090565b6127108111610c0257690ba58e545582d460000091505090565b5090565b333214610c26576040516313941d1960e11b815260040160405180910390fd5b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca8919061228d565b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2a919061228d565b610d359060016122bc565b11610d53576040516326d727a160e21b815260040160405180910390fd5b6000610d5d611827565b604051632770a7eb60e21b8152336004820152602481018290529091507f000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf6001600160a01b031690639dc29fac90604401600060405180830381600087803b158015610dc857600080fd5b505af1158015610ddc573d6000803e3d6000fd5b50505050610de8611c38565b50565b6000610df681611ad2565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e2481611ad2565b604051634aa7d2f760e11b81523060048201523360248201526002604360981b019063954fa5ee906044016020604051808303816000875af1158015610e6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e919061228d565b6000333214610eb4576040516313941d1960e11b815260040160405180910390fd5b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f36919061228d565b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb8919061228d565b1015610fd7576040516326d727a160e21b815260040160405180910390fd5b600560008154610fe6906122cf565b90915550600580546000908152600860209081526040808320439055835483526009825280832080546001600160a01b031916339081179091558352600a825282209254835460018101855593835290822090920191909155611047610a52565b604051632770a7eb60e21b8152336004820152602481018290529091507f000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf6001600160a01b031690639dc29fac90604401600060405180830381600087803b1580156110b257600080fd5b505af11580156110c6573d6000803e3d6000fd5b505050507f4a70c8064c4fcfe4bcb8b91338773626c2bbde76557cb26643853568fb96c19c6005546040516110fd91815260200190565b60405180910390a1505060055490565b600061111881611ad2565b50600255565b33321461113e576040516313941d1960e11b815260040160405180910390fd5b600061114984611cf1565b905060008184604051602001611169929190918252602082015260400190565b60408051601f1981840301815291905280516020909101206003549091506001600160a01b03166111cb846108eb847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b6001600160a01b0316146111f25760405163b85d0a9160e01b815260040160405180910390fd5b6111fc8585611d21565b5050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600061123781611ad2565b5060038054911515600160a81b0260ff60a81b19909216919091179055565b333214611276576040516313941d1960e11b815260040160405180910390fd5b600354600160a01b900460ff166112a057604051632515260560e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff193360601b16602082015260009060340160405160208183030381529060405280519060200120905060045434146112fb57604051631ef62ee960e01b815260040160405180910390fd5b61133c838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050611da9565b6113595760405163cdf1b4e160e01b815260040160405180910390fd5b3360009081526006602052604090205460ff161561138a576040516390e6791960e01b815260040160405180910390fd5b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140c919061228d565b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa15801561146a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148e919061228d565b6114999060016122bc565b11156114b857604051630ecf3ff160e01b815260040160405180910390fd5b6109d5611c38565b3332146114e0576040516313941d1960e11b815260040160405180910390fd5b60006114eb82611cf1565b905080408061150d5760405163675aa04560e11b815260040160405180910390fd5b6109d58382611d21565b333214611537576040516313941d1960e11b815260040160405180910390fd5b6000818152600960205260409020546001600160a01b0316331461156e576040516346e5ad4760e01b815260040160405180910390fd5b600081815260096020526040812080546001600160a01b031916905561159382611b6e565b9050806000036115b6576040516346e5ad4760e01b815260040160405180910390fd5b8040806115d65760405163675aa04560e11b815260040160405180910390fd5b6040516340c10f1960e01b81523360048201526024810182905281907f00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b37576001600160a01b0316906340c10f1990604401600060405180830381600087803b15801561164057600080fd5b505af1158015611654573d6000803e3d6000fd5b5050505050505050565b60008281526020819052604090206001015461167981611ad2565b6108388383611bcd565b3332146116a3576040516313941d1960e11b815260040160405180910390fd5b600354600160a81b900460ff166116cd5760405163019570d760e11b815260040160405180910390fd5b60045434146116ef57604051631ef62ee960e01b815260040160405180910390fd5b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031663c084f5406040518163ffffffff1660e01b8152600401602060405180830381865afa15801561174d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611771919061228d565b7f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f3919061228d565b6117fe9060016122bc565b111561181d57604051630ecf3ff160e01b815260040160405180910390fd5b611825611c38565b565b6000807f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b0316634f02c4206040518163ffffffff1660e01b8152600401602060405180830381865afa158015611888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ac919061228d565b6118b79060016122bc565b905061177081116118d35769014542ba12a337c0000091505090565b611b5881116118ed5769017b7883c0691660000091505090565b611f408111611907576901b1ae4d6e2ef500000091505090565b6123288111611921576901e7e4171bf4d3a0000091505090565b612710811161193b5769021e19e0c9bab240000091505090565b612af88111611955576902a5a058fc295ed0000091505090565b612ee0811161196f5769032d26d12e980b60000091505090565b6132c88111611989576903b4ad496106b7f0000091505090565b6136b081116119a35769043c33c193756480000091505090565b613a9881116119bd576904c3ba39c5e41110000091505090565b613e8081116119d75769054b40b1f852bda0000091505090565b61426881116119f15769065a4da25d3016c0000091505090565b6146508111611a0b576906e1d41a8f9ec350000091505090565b614a388111611a25576907695a92c20d6fe0000091505090565b614e208111611a3f57690878678326eac900000091505090565b6152088111611a59576908ffedfb59597590000091505090565b6155f08111611a735769098774738bc82220000091505090565b6159d88111611a8d57690a968163f0a57b40000091505090565b615dc08111611aa757690b1e07dc231427d0000091505090565b6161a88111610c0257690ba58e545582d460000091505090565b6000611acc81611ad2565b50600455565b610de88133611dbf565b6000611ae88383611203565b611b66576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055611b1e3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016107b2565b5060006107b2565b60008181526008602052604081205490819003611b9e576040516346e5ad4760e01b815260040160405180910390fd5b919050565b600080600080611bb38686611dfd565b925092509250611bc38282611e4a565b5090949350505050565b6000611bd98383611203565b15611b66576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016107b2565b6040516335313c2160e11b81523360048201526000907f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031690636a627842906024016020604051808303816000875af1158015611ca1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc5919061228d565b600090815260076020908152604080832043905533835260069091529020805460ff1916600117905550565b60008181526007602052604081205490819003611b9e57604051635c7a535d60e11b815260040160405180910390fd5b604051639348cef760e01b8152600481018390526024810182905281907f000000000000000000000000d641dde60985fab88c623188adba6be3148288d96001600160a01b031690639348cef790604401600060405180830381600087803b158015611d8c57600080fd5b505af1158015611da0573d6000803e3d6000fd5b50505050505050565b600082611db68584611f03565b14949350505050565b611dc98282611203565b610a4e5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044015b60405180910390fd5b60008060008351604103611e375760208401516040850151606086015160001a611e2988828585611f50565b955095509550505050611e43565b50508151600091506002905b9250925092565b6000826003811115611e5e57611e5e6122e8565b03611e67575050565b6001826003811115611e7b57611e7b6122e8565b03611e995760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611ead57611ead6122e8565b03611ece5760405163fce698f760e01b815260048101829052602401611df4565b6003826003811115611ee257611ee26122e8565b03610a4e576040516335e2f38360e21b815260048101829052602401611df4565b600081815b8451811015611f4857611f3482868381518110611f2757611f276122fe565b602002602001015161201f565b915080611f40816122cf565b915050611f08565b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611f8b5750600091506003905082612015565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611fdf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661200b57506000925060019150829050612015565b9250600091508190505b9450945094915050565b600081831061203b57600082815260208490526040902061204a565b60008381526020839052604090205b9392505050565b60006020828403121561206357600080fd5b81356001600160e01b03198116811461204a57600080fd5b60006020828403121561208d57600080fd5b8135801515811461204a57600080fd5b80356001600160a01b0381168114611b9e57600080fd5b6000602082840312156120c657600080fd5b61204a8261209d565b6000602082840312156120e157600080fd5b5035919050565b600080604083850312156120fb57600080fd5b6121048361209d565b946020939093013593505050565b6000806040838503121561212557600080fd5b823591506121356020840161209d565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561216957600080fd5b8335925060208401359150604084013567ffffffffffffffff8082111561218f57600080fd5b818601915086601f8301126121a357600080fd5b8135818111156121b5576121b561213e565b604051601f8201601f19908116603f011681019083821181831017156121dd576121dd61213e565b816040528281528960208487010111156121f657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806020838503121561222b57600080fd5b823567ffffffffffffffff8082111561224357600080fd5b818501915085601f83011261225757600080fd5b81358181111561226657600080fd5b8660208260051b850101111561227b57600080fd5b60209290920196919550909350505050565b60006020828403121561229f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156107b2576107b26122a6565b6000600182016122e1576122e16122a6565b5060010190565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea26469706673582212208b6c57eb0884d2761d499ae1e1a7bd09ce3caa01ac9bf79608439801f94eed5364736f6c63430008140033

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

0000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800000000000000000000000000a82eb14d67dd9f0e9fda72e1a85e7d6f3c4c616d000000000000000000000000d641dde60985fab88c623188adba6be3148288d900000000000000000000000007fd77f6a74675501564f9d6ece327a0909b3757000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf

-----Decoded View---------------
Arg [0] : _blastPointsAddress (address): 0x2536FE9ab3F511540F2f9e2eC2A805005C3Dd800
Arg [1] : _pointsOperator (address): 0xa82Eb14D67dd9F0E9FdA72e1a85E7d6F3C4c616d
Arg [2] : _blastrunnersAdress (address): 0xd641DDE60985fAb88c623188aDbA6BE3148288d9
Arg [3] : _businessAddress (address): 0x07fd77f6A74675501564F9D6eCe327a0909b3757
Arg [4] : _creditsAddress (address): 0xF92F745d01dCF362AD3E6E4bAad24230DEdCfFDF

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000002536fe9ab3f511540f2f9e2ec2a805005c3dd800
Arg [1] : 000000000000000000000000a82eb14d67dd9f0e9fda72e1a85e7d6f3c4c616d
Arg [2] : 000000000000000000000000d641dde60985fab88c623188adba6be3148288d9
Arg [3] : 00000000000000000000000007fd77f6a74675501564f9d6ece327a0909b3757
Arg [4] : 000000000000000000000000f92f745d01dcf362ad3e6e4baad24230dedcffdf


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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