POL Price: $0.70559 (+0.87%)
 

Overview

Max Total Supply

0

Holders

64

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0x962eBC7915cF58EbeFAD620d05e7863314Ff155A
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
WrasslersCardPack

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 22 : WrasslerCardPack.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
/*
.                                                                                                                                          .
.  .cxxo.                 ;dxxo:cdxxdxxxxxo::dxxc.   .ldxxxdxxxxxo' 'oxxxxxxxxxxxl.   .cdxxl.      .ldxxxxxxo::dxxxxxxxxo:cdxxxxxxxxxd:.   .
.  .OMMX;               .dNMMXkONMMMMMMMMXkONMMM0'  ;0WMMMWMMWMWKc'cKWMMMMMMMMMW0;   ,kWMW0;      ;0WMMMMMMXkONMMMMMMMWXkONMMMMMMMMMNx'    .
.  .OMMX;    .,,,.     ;OWMW0kKWMWXXWMMW0k0WMMMM0'.oXMWXdcccccc:''xNMWWKocccccc:.  .cKWMNx.     .oXMMXxcccldKWMWXXWWMW0k0WMWOlcccccc;.     .
.  .OMMX:   ;ONWWk.  .lXWMNOkXWMN0KNWMNOkXWWMMWM0lkWMMW0occcccc,:0WWWNXOlcccccc.  .xNMWKc.     'kWMW0;   .lXWMNKKNWWXxxXWMMXxcccccc:.      .
.  .OMMX: .oXMMMMO. 'kWMWKk0NMMWNNWMWKk0NMW0ONMM0kXMMMMMMMMMMMWOkWMMMMWMMMMMMMWl.:0WMWk'     .cKWMWk'   'kWMMMNNWMW0:'kMMMMMMMMMMMMX;      .
.  .OMMX:,kWMMMMMO,cKWMNOkKWMMMMMMWXOkKWMNx':XMM0ooxxxxxxONMMMNocdxxxxxxx0WMMMXodXMMXo.     .xNMMMW0kxclKWMMMMMMWXx. .cxxxxxxkKWMMWO'      .
.  .OMMN0KWMNNWMMX0NMWXkONMMKx0WMM0okNMMKl. ;XMM0:',,.  'xNMWKc..','.   ,OWMWKk0WMW0;      ;0WMMWWWWXkONMWKxOWMMO;.'''.     .cKWMNx'       .
.  .OMMMMMWKloNMMMMMW0kKWMWO, lNMMXXWMWO,   ;XMM0kKNNk';0WMWk,  lXNNo..lKWMNOkXMMNd.     .oXMMXd:::cdKWMWO, cNMMx.oNNNo    .dNMMXl.        .
.  .OMMMMWO, :NMMWWXkkXWMXo.  lNMMMMMXo.    ;XMM0kNMMXOXMWXo.   oWMWK0KNMWKkONWMWXdllll;;kWMMWKdlllxXMMXo.  cNMWx'dWMW0ollo0WMWO,          .
.  .OMMMXo.  :NMMWKk0WMW0;    lNMMWW0;      ;XMM0kNMMMMMW0;     oWMMMMMMN0kKWMMMMMMMMNOkXWMMMMMMMMMMMW0;    cNMMx'dWMMMMMMMMWXo.           .
.  .:ooo,    .looc;:oooc.     'ooool.       .looc:loooooc.      ,ooooooo:;coooooooooo:;loooooooooooooc.     'loo;.,oooooooooo;             .
.                                                                                                                                          .*/

import "@0xessential/contracts/fwd/EssentialERC2771Context.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "../Libraries/Assigner.sol";
import "../Libraries/SignedAllowance.sol";

contract WrasslersCardPack is
    Assigner,
    ERC1155,
    AccessControl,
    VRFConsumerBase,
    SignedAllowance,
    EssentialERC2771Context
{
    /// ============ Structs ============

    /// @notice Used in allowance signing
    struct Signable {
        uint256 nonce;
        address minter;
        bytes32 message;
    }

    struct Token {
        address minter;
        uint64 id;
    }

    /// ============ Immutable storage ============
    IERC20 public immutable LINK_TOKEN;
    bytes32 internal immutable KEY_HASH;
    uint256 internal LINK_FEE;
    uint256 public constant TOTAL_SUPPLY = 2100;
    address public FE_WRASSLERS;

    /// ============ Mutable storage ============
    /// @notice Number of assigned tokens
    uint256 public shuffledCount;
    /// @notice Number of Wrasslers per minted Packs
    uint256 public mintedSupply;

    mapping(bytes32 => Token) public openers;

    /// @notice Global array of shuffled tokenIds.
    mapping(uint256 => Token) public tokens;

    /// ============ Events ============
    event RequestedRandomness(bytes32 requestId);

    constructor(
        bytes32 _LINK_KEY_HASH,
        address _LINK_ADDRESS,
        address _LINK_VRF_COORDINATOR_ADDRESS,
        address _trustedForwarder,
        address firstEditionWrasslers
    )
        ERC1155("ipfs://QmPKfR2SfABB3n7P71sx6iU6efGr6N3e7tBKrDnZJVS8KP/{id}.json")
        VRFConsumerBase(_LINK_VRF_COORDINATOR_ADDRESS, _LINK_ADDRESS)
        EssentialERC2771Context(_trustedForwarder)
    {
        LINK_TOKEN = IERC20(_LINK_ADDRESS);
        KEY_HASH = _LINK_KEY_HASH;
        LINK_FEE = 0.0001 * 10**18;
        FE_WRASSLERS = firstEditionWrasslers;
    }

    /// ============ User Functions ============

    /// @notice Claim selection of 1, 3 and 5 packs per airdrop
    /// @param packs selection of packs by tokenId
    /// @param signature signature created offchain and provided to user
    function claimPacks(uint256[] calldata packs, bytes calldata signature) external {
        uint256 total;
        uint256[] memory amounts = packs;

        for (uint256 i = 0; i < packs.length; i++) {
            require(packs[i] == 1 || packs[i] == 3 || packs[i] == 5, "Invalid pack ID");
            total += packs[i];
            amounts[i] = 1;
        }

        _useAllowance(_msgSender(), total, signature);
        _mintBatch(_msgSender(), packs, amounts, "");

        mintedSupply += total;

        require(mintedSupply <= TOTAL_SUPPLY, "Invalid mint");
    }

    /// @notice Burn card pack NFT to receive randomized NFTs
    /// @param tokenId corresponds to count of NFTs to randomly assign
    function openPack(uint64 tokenId) external {
        _burn(_msgSender(), tokenId, 1);

        // request random entropy for pack
        bytes32 requestId = requestRandomness(KEY_HASH, LINK_FEE);

        // store minter and pack count for randomness request
        openers[requestId] = Token({minter: _msgSender(), id: tokenId});

        // event mostly used for testing
        emit RequestedRandomness(requestId);
    }

    /// @notice Fulfills randomness from Chainlink VRF
    /// @param randomness random number from VRF
    function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
        Token memory pass = openers[requestId];
        randomizePack(pass.id, randomness, pass.minter);
    }

    function randomizePack(
        uint256 numShuffles,
        uint256 entropy,
        address minter
    ) internal {
        uint256 nextId = shuffledCount + numShuffles;

        for (uint256 i = shuffledCount; i < nextId; ) {
            // Generate a random index to select from
            uint256 randomIndex = i + (entropy % (TOTAL_SUPPLY - i));

            // Collect the Token at that random index - this has been warmed or swapped to
            Token memory assignedToken = tokens[randomIndex];

            // Move the less random Token from the current index to randomIndex
            tokens[randomIndex] = tokens[i];

            // Set minter on assigned Token
            assignedToken.minter = minter;

            // Write assigned Token to storage at current Index
            tokens[i] = assignedToken;

            // Emit event used for creating offchain signatures
            emit Assigned(minter, assignedToken.id);

            unchecked {
                ++i;
            }
        }

        // Update number of shuffled entries
        shuffledCount = nextId;
    }

    /// ============ Admin Functions ============

    function devMintMultiple(Token[] calldata addresses) external onlyOwner {
        uint256 count = addresses.length;
        require(LINK_TOKEN.balanceOf(address(this)) >= LINK_FEE * count, "Not enough LINK");

        for (uint256 index = 0; index < count; ) {
            Token calldata pass = addresses[index];
            require(mintedSupply + pass.id <= TOTAL_SUPPLY, "Mint pass exceeds token supply");
            _mint(pass.minter, pass.id, 1, "");
            unchecked {
                ++index;
                mintedSupply += pass.id;
            }
        }
    }

    /// @notice Warm the Fisher Yates shuffle mapping
    /// @param ids array of randomized tokenIds
    /// @dev warming the tokens array with offchain randomness helps remove some bias in Fisher Yates
    /// while also saving some gas on chainlink callback and simplifying the shuffle function
    function warm(uint64[] calldata ids, uint256 offset) external onlyOwner {
        require(tokens[offset].id == 0, "Already warmed");
        uint256 nextOffset = offset + ids.length;
        for (uint256 i = offset; i < nextOffset; ) {
            uint64 id = ids[i - offset];
            tokens[i] = Token({id: id, minter: address(0)});
            unchecked {
                ++i;
            }
        }
    }

    /// @notice Helper that returns minter => tokenId data for signing
    /// @param start the raffle tranche
    /// @param count the raffle tranche
    /// @return signables messages for signing and the data encoded in each message
    /// @dev Each message is signed off-chain and provided to a dApp alongside the
    /// encoded data. Minters can submit the data and signature to the L1 NFT contract
    /// to claim their assigned tokens.
    function buildMessages(uint256 start, uint256 count) external view returns (Signable[] memory signables) {
        signables = new Signable[](count);
        uint256 max = count + 1;

        for (uint256 index = start; index < max; index++) {
            Token memory token = tokens[index];
            address account = token.minter;
            uint256 tokenId = token.id;
            signables[index] = Signable({
                message: createMessage(account, tokenId, FE_WRASSLERS),
                nonce: tokenId,
                minter: account
            });
        }
    }

    function setSigner(address _signer) external {
        _setAllowancesSigner(_signer);
    }

    function withdrawErc20(IERC20 token) external onlyOwner {
        require(token.transfer(msg.sender, token.balanceOf(address(this))), "Transfer failed");
    }

    function _msgSender() internal view virtual override(Context, EssentialERC2771Context) returns (address sender) {
        return EssentialERC2771Context._msgSender();
    }

    function _msgData() internal view virtual override(Context, EssentialERC2771Context) returns (bytes calldata) {
        return EssentialERC2771Context._msgData();
    }

    function supportsInterface(bytes4 interfaceId) public view override(AccessControl, ERC1155) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}

File 2 of 22 : EssentialERC2771Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts/utils/Context.sol";
import "./IForwardRequest.sol";

/**
 * @dev Context variant with ERC2771 support.
 */
abstract contract EssentialERC2771Context is Context {
    address private _trustedForwarder;
    address public owner;

    modifier onlyOwner() {
        require(msg.sender == owner, "403");
        _;
    }

    modifier onlyForwarder() {
        require(isTrustedForwarder(msg.sender), "Counter:429");
        _;
    }

    constructor(address trustedForwarder) {
        owner = msg.sender;
        _trustedForwarder = trustedForwarder;
    }

    function setTrustedForwarder(address trustedForwarder) external onlyOwner {
        _trustedForwarder = trustedForwarder;
    }

    function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
        return forwarder == _trustedForwarder;
    }

    function _msgSender() internal view virtual override returns (address sender) {
        if (isTrustedForwarder(msg.sender)) {
            // The assembly code is more direct than the Solidity version using `abi.decode`.
            assembly {
                sender := shr(0x60, calldataload(sub(calldatasize(), 20)))
            }
        } else {
            return super._msgSender();
        }
    }

    function _msgData() internal view virtual override returns (bytes calldata) {
        if (isTrustedForwarder(msg.sender)) {
            return msg.data[:msg.data.length - 72];
        } else {
            return super._msgData();
        }
    }

    function _msgNFT() internal view returns (IForwardRequest.NFT memory) {
        uint256 chainId;
        uint256 tokenId;
        address contractAddress;
        if (isTrustedForwarder(msg.sender)) {
            assembly {
                chainId := calldataload(sub(calldatasize(), 104))
                contractAddress := shr(0x60, calldataload(sub(calldatasize(), 40)))
                tokenId := calldataload(sub(calldatasize(), 72))
            }
        }

        return IForwardRequest.NFT({contractAddress: contractAddress, tokenId: tokenId, chainId: chainId});
    }
}

File 3 of 22 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {
  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBase expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomness the VRF output
   */
  function fulfillRandomness(bytes32 requestId, uint256 randomness) internal virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 private constant USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(bytes32 _keyHash, uint256 _fee) internal returns (bytes32 requestId) {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* nonce */
    private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(address _vrfCoordinator, address _link) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 4 of 22 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../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:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 5 of 22 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 6 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 7 of 22 : Assigner.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

/**
 * @dev Standardized event for L2 contracts enables off-chain listeners
 * to create signatures and perform L1 token transfers.
 */
abstract contract Assigner {
    event Assigned(address indexed minter, uint64 indexed tokenId);
}

File 8 of 22 : SignedAllowance.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

/// @title SignedAllowance
/// @author Simon Fremaux (@dievardump)
contract SignedAllowance {
    using ECDSA for bytes32;

    // list of already used allowances
    mapping(bytes32 => bool) public usedAllowances;

    // address used to sign the allowances
    address private _allowancesSigner;

    /// @notice Helper to know allowancesSigner address
    /// @return the allowance signer address
    function allowancesSigner() public view virtual returns (address) {
        return _allowancesSigner;
    }

    /// @notice Helper that creates the message that signer needs to sign to allow a mint
    ///         this is usually also used when creating the allowances, to ensure "message"
    ///         is the same
    /// @param account the account to allow
    /// @param nonce the nonce
    /// @param _for contract address where the allowance can be used
    /// @return the message to sign
    function createMessage(
        address account,
        uint256 nonce,
        address _for
    ) public pure returns (bytes32) {
        return keccak256(abi.encode(account, nonce, _for));
    }

    /// @notice Helper that creates a list of messages that signer needs to sign to allow mintings
    /// @param accounts the accounts to allow
    /// @param nonces the corresponding nonces
    /// @return messages the messages to sign
    function createMessages(
        address[] memory accounts,
        uint256[] memory nonces,
        address _for
    ) internal pure returns (bytes32[] memory messages) {
        require(accounts.length == nonces.length, "!LENGTH_MISMATCH!");
        messages = new bytes32[](accounts.length);
        for (uint256 i; i < accounts.length; i++) {
            messages[i] = createMessage(accounts[i], nonces[i], _for);
        }
    }

    /// @notice This function verifies that the current request is valid
    /// @dev It ensures that _allowancesSigner signed a message containing (account, nonce, address(this))
    ///      and that this message was not already used
    /// @param account the account the allowance is associated to
    /// @param nonce the nonce associated to this allowance
    /// @param signature the signature by the allowance signer wallet
    /// @return bool whether the signature is valid
    function validateSignature(
        address account,
        uint256 nonce,
        bytes memory signature
    ) external view returns (bool) {
        _validateSignature(account, nonce, signature);
        return true;
    }

    /// @dev It ensures that signer signed a message containing (account, nonce, address(this))
    ///      and that this message was not already used
    /// @param account the account the allowance is associated to
    /// @param nonce the nonce associated to this allowance
    /// @param signature the signature by the allowance signer wallet
    /// @return the message to mark as used
    function _validateSignature(
        address account,
        uint256 nonce,
        bytes memory signature
    ) internal view returns (bytes32) {
        bytes32 message = createMessage(account, nonce, address(this)).toEthSignedMessageHash();

        require(message.recover(signature) == allowancesSigner(), "!INVALID_SIGNATURE!");
        require(usedAllowances[message] == false, "!ALREADY_USED!");

        return message;
    }

    /// @notice internal function that verifies an allowance and marks it as used
    ///         this function throws if signature is wrong or this nonce for this user has already been used
    /// @param account the account the allowance is associated to
    /// @param nonce the nonce
    /// @param signature the signature by the allowance wallet
    function _useAllowance(
        address account,
        uint256 nonce,
        bytes memory signature
    ) internal {
        bytes32 message = _validateSignature(account, nonce, signature);
        usedAllowances[message] = true;
    }

    /// @notice Allows to change the allowance signer. This can be used to revoke any signed allowance not already used
    /// @param newSigner the new signer address
    function _setAllowancesSigner(address newSigner) internal {
        _allowancesSigner = newSigner;
    }
}

File 9 of 22 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 10 of 22 : IForwardRequest.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

interface IForwardRequest {
    struct ERC721ForwardRequest {
        address from; // Externally-owned account (EOA) signing the request.
        address authorizer; // Externally-owned account (EOA) that authorized from account in PlaySession.
        address to; // Destination address, normally a smart contract for an nFight game.
        address nftContract; // The address of the NFT contract for the token being used.
        uint256 nftTokenId; // The tokenId of the NFT being used
        uint256 nftChainId; // The chainId of the NFT neing used
        uint256 targetChainId; // The chainId where the Forwarder and implementation contract are deployed.
        uint256 value; // Amount of ether to transfer to the destination.
        uint256 gas; // Amount of gas limit to set for the execution.
        uint256 nonce; // On-chain tracked nonce of a transaction.
        bytes data; // (Call)data to be sent to the destination.
    }

    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    struct PlaySession {
        address authorized; // Burner EOA that is authorized to play with NFTs by owner EOA.
        uint256 expiresAt; // block timestamp when the session is invalidated.
    }

    struct NFT {
        address contractAddress;
        uint256 tokenId;
        uint256 chainId;
    }
}

File 11 of 22 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 12 of 22 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {
  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  ) internal pure returns (uint256) {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

File 13 of 22 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {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 `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 14 of 22 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 15 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 16 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 17 of 22 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 18 of 22 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 19 of 22 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 20 of 22 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 21 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

File 22 of 22 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes32","name":"_LINK_KEY_HASH","type":"bytes32"},{"internalType":"address","name":"_LINK_ADDRESS","type":"address"},{"internalType":"address","name":"_LINK_VRF_COORDINATOR_ADDRESS","type":"address"},{"internalType":"address","name":"_trustedForwarder","type":"address"},{"internalType":"address","name":"firstEditionWrasslers","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"Assigned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestedRandomness","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FE_WRASSLERS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LINK_TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowancesSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"buildMessages","outputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"bytes32","name":"message","type":"bytes32"}],"internalType":"struct WrasslersCardPack.Signable[]","name":"signables","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"packs","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claimPacks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"_for","type":"address"}],"name":"createMessage","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint64","name":"id","type":"uint64"}],"internalType":"struct WrasslersCardPack.Token[]","name":"addresses","type":"tuple[]"}],"name":"devMintMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"openPack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"openers","outputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"trustedForwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shuffledCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedAllowances","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"validateSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"ids","type":"uint64[]"},{"internalType":"uint256","name":"offset","type":"uint256"}],"name":"warm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b5060405162003a6b38038062003a6b8339810160408190526200003591620000f4565b8183856040518060600160405280603f815260200162003a2c603f91396200005d81620000c5565b506001600160a01b0391821660a052811660805260088054336001600160a01b0319918216179091556007805482169383169390931790925594851660c05260e095909552655af3107a4000600955600a805490951693169290921790925550620002cc9050565b6002620000d3828262000200565b5050565b80516001600160a01b0381168114620000ef57600080fd5b919050565b600080600080600060a086880312156200010d57600080fd5b855194506200011f60208701620000d7565b93506200012f60408701620000d7565b92506200013f60608701620000d7565b91506200014f60808701620000d7565b90509295509295909350565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018657607f821691505b602082108103620001a757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001fb57600081815260208120601f850160051c81016020861015620001d65750805b601f850160051c820191505b81811015620001f757828155600101620001e2565b5050505b505050565b81516001600160401b038111156200021c576200021c6200015b565b62000234816200022d845462000171565b84620001ad565b602080601f8311600181146200026c5760008415620002535750858301515b600019600386901b1c1916600185901b178555620001f7565b600085815260208120601f198616915b828110156200029d578886015182559484019460019091019084016200027c565b5085821015620002bc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051613718620003146000396000610d4f0152600081816105c30152610b47015260008181610e4d0152611be201526000611bb301526137186000f3fe608060405234801561001057600080fd5b506004361061021b5760003560e01c80638da5cb5b11610125578063c7e42b1b116100ad578063eaa626c91161007c578063eaa626c914610598578063eb924a67146105ab578063eedac3a6146105be578063f242432a146105e5578063ff936407146105f857600080fd5b8063c7e42b1b14610523578063d547741f14610536578063da74222814610549578063e985e9c51461055c57600080fd5b806394985ddd116100f457806394985ddd146104d9578063a217fddf146104ec578063a22cb465146104f4578063b757e60a14610507578063c1bd8cf91461051a57600080fd5b80638da5cb5b14610497578063902d55a5146104aa5780639199a61c146104b357806391d14854146104c657600080fd5b806336568abe116101a8578063572b6c0511610177578063572b6c05146103ea57806361e93b9d1461040c5780636c19e783146104475780638838b5c314610473578063890621da1461048457600080fd5b806336568abe146103425780634e1273f4146103555780634f64b2be1461037557806356725390146103d757600080fd5b8063195e8708116101ef578063195e8708146102a957806319d7324e146102cc578063248a9ca3146102f75780632eb2c2d61461031a5780632f2ff15d1461032f57600080fd5b8062fdd58e1461022057806301ffc9a7146102465780630e89341c14610269578063127d0d0814610289575b600080fd5b61023361022e366004612a0c565b610601565b6040519081526020015b60405180910390f35b610259610254366004612a4e565b61069b565b604051901515815260200161023d565b61027c610277366004612a6b565b6106a6565b60405161023d9190612ad4565b61029c610297366004612ae7565b61073a565b60405161023d9190612b09565b6102596102b7366004612a6b565b60056020526000908152604090205460ff1681565b600a546102df906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b610233610305366004612a6b565b60009081526003602052604090206001015490565b61032d610328366004612cb4565b610866565b005b61032d61033d366004612d61565b61090f565b61032d610350366004612d61565b610941565b610368610363366004612d91565b6109cf565b60405161023d9190612e98565b6103b0610383366004612a6b565b600e602052600090815260409020546001600160a01b03811690600160a01b90046001600160401b031682565b604080516001600160a01b0390931683526001600160401b0390911660208301520161023d565b61032d6103e5366004612eab565b610af8565b6102596103f8366004612f1f565b6007546001600160a01b0391821691161490565b6103b061041a366004612a6b565b600d602052600090815260409020546001600160a01b03811690600160a01b90046001600160401b031682565b61032d610455366004612f1f565b600680546001600160a01b0319166001600160a01b03831617905550565b6006546001600160a01b03166102df565b610259610492366004612f3c565b610d14565b6008546102df906001600160a01b031681565b61023361083481565b61032d6104c1366004612f94565b610d2c565b6102596104d4366004612d61565b610e17565b61032d6104e7366004612ae7565b610e42565b610233600081565b61032d610502366004612fcb565b610ec4565b61032d61051536600461303d565b610ed6565b610233600c5481565b61032d610531366004612f1f565b61110d565b61032d610544366004612d61565b611256565b61032d610557366004612f1f565b61127e565b61025961056a3660046130d3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102336105a6366004613101565b6112ca565b61032d6105b9366004613143565b611311565b6102df7f000000000000000000000000000000000000000000000000000000000000000081565b61032d6105f336600461318e565b611444565b610233600b5481565b60006001600160a01b0383166106725760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610695826114dd565b6060600280546106b5906131f6565b80601f01602080910402602001604051908101604052809291908181526020018280546106e1906131f6565b801561072e5780601f106107035761010080835404028352916020019161072e565b820191906000526020600020905b81548152906001019060200180831161071157829003601f168201915b50505050509050919050565b6060816001600160401b0381111561075457610754612b6b565b60405190808252806020026020018201604052801561079f57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816107725790505b50905060006107af836001613246565b9050835b8181101561085e576000818152600e60209081526040918290208251808401845290546001600160a01b03808216808452600160a01b9092046001600160401b03168385018190528551606081018752818152948501839052600a5493959294909390928301916108289186918691166112ca565b81525086858151811061083d5761083d613259565b602002602001018190525050505080806108569061326f565b9150506107b3565b505092915050565b61086e611502565b6001600160a01b0316856001600160a01b0316148061089457506108948561056a611502565b6108fb5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610669565b6109088585858585611511565b5050505050565b6000828152600360205260409020600101546109328161092d611502565b6116b0565b61093c8383611714565b505050565b610949611502565b6001600160a01b0316816001600160a01b0316146109c15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610669565b6109cb828261179b565b5050565b60608151835114610a345760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610669565b600083516001600160401b03811115610a4f57610a4f612b6b565b604051908082528060200260200182016040528015610a78578160200160208202803683370190505b50905060005b8451811015610af057610ac3858281518110610a9c57610a9c613259565b6020026020010151858381518110610ab657610ab6613259565b6020026020010151610601565b828281518110610ad557610ad5613259565b6020908102919091010152610ae98161326f565b9050610a7e565b509392505050565b6008546001600160a01b03163314610b225760405162461bcd60e51b815260040161066990613288565b6009548190610b329082906132a5565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bba91906132bc565b1015610bfa5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610669565b60005b81811015610d0b5736848483818110610c1857610c18613259565b9050604002019050610834816020016020810190610c369190612f94565b6001600160401b0316600c54610c4c9190613246565b1115610c9a5760405162461bcd60e51b815260206004820152601e60248201527f4d696e742070617373206578636565647320746f6b656e20737570706c7900006044820152606401610669565b610cda610caa6020830183612f1f565b610cba6040840160208501612f94565b6001600160401b0316600160405180602001604052806000815250611820565b600190910190610cf06040820160208301612f94565b600c80546001600160401b0392909216909101905550610bfd565b50505050565b50565b6000610d218484846118fb565b506001949350505050565b610d48610d37611502565b826001600160401b03166001611a2a565b6000610d767f0000000000000000000000000000000000000000000000000000000000000000600954611baf565b90506040518060400160405280610d8b611502565b6001600160a01b0390811682526001600160401b038581166020938401526000858152600d8452604090819020855181549686015194166001600160e01b031990961695909517600160a01b93909216929092021790925590518281527fe5f5b44d72d4143c278eb745c4acc0695c4a5bc616be5beecf46abe29661780e910160405180910390a15050565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eba5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610669565b6109cb8282611d2b565b6109cb610ecf611502565b8383611d76565b60008085858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509394505050505b8581101561100e57868682818110610f2957610f29613259565b9050602002013560011480610f565750868682818110610f4b57610f4b613259565b905060200201356003145b80610f795750868682818110610f6e57610f6e613259565b905060200201356005145b610fb75760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081c1858dac81251608a1b6044820152606401610669565b868682818110610fc957610fc9613259565b9050602002013583610fdb9190613246565b92506001828281518110610ff157610ff1613259565b6020908102919091010152806110068161326f565b915050610f0f565b5061105761101a611502565b8386868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e5692505050565b6110ab611062611502565b878780806020026020016040519081016040528093929190818152602001838360200280828437600092018290525060408051602081019091529081528793509150611e829050565b81600c60008282546110bd9190613246565b9091555050600c5461083410156111055760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081b5a5b9d60a21b6044820152606401610669565b505050505050565b6008546001600160a01b031633146111375760405162461bcd60e51b815260040161066990613288565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a991906132bc565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156111f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121891906132d5565b610d115760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610669565b6000828152600360205260409020600101546112748161092d611502565b61093c838361179b565b6008546001600160a01b031633146112a85760405162461bcd60e51b815260040161066990613288565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b03808616602083015291810184905290821660608201526000906080016040516020818303038152906040528051906020012090509392505050565b6008546001600160a01b0316331461133b5760405162461bcd60e51b815260040161066990613288565b6000818152600e6020526040902054600160a01b90046001600160401b0316156113985760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481dd85c9b595960921b6044820152606401610669565b60006113a48383613246565b9050815b8181101561090857600085856113be86856132f2565b8181106113cd576113cd613259565b90506020020160208101906113e29190612f94565b60408051808201825260008082526001600160401b039384166020808401918252878352600e9052929020905181549251909316600160a01b026001600160e01b03199092166001600160a01b039390931692909217179055506001016113a8565b61144c611502565b6001600160a01b0316856001600160a01b0316148061147257506114728561056a611502565b6114d05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610669565b6109088585858585611fd8565b60006001600160e01b03198216637965db0b60e01b1480610695575061069582612100565b600061150c612150565b905090565b81518351146115325760405162461bcd60e51b815260040161066990613305565b6001600160a01b0384166115585760405162461bcd60e51b81526004016106699061334d565b6000611562611502565b905060005b845181101561164a57600085828151811061158457611584613259565b6020026020010151905060008583815181106115a2576115a2613259565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156115f25760405162461bcd60e51b815260040161066990613392565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061162f908490613246565b92505081905550505050806116439061326f565b9050611567565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161169a9291906133dc565b60405180910390a461110581878787878761217a565b6116ba8282610e17565b6109cb576116d2816001600160a01b031660146122d5565b6116dd8360206122d5565b6040516020016116ee92919061340a565b60408051601f198184030181529082905262461bcd60e51b825261066991600401612ad4565b61171e8282610e17565b6109cb5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611757611502565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6117a58282610e17565b156109cb5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff191690556117dc611502565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6001600160a01b0384166118465760405162461bcd60e51b81526004016106699061347f565b6000611850611502565b905061186b8160008761186288612477565b61090888612477565b6000848152602081815260408083206001600160a01b03891684529091528120805485929061189b908490613246565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610908816000878787876124c2565b60008061195f61190c8686306112ca565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506119736006546001600160a01b031690565b6001600160a01b0316611986828561257d565b6001600160a01b0316146119d25760405162461bcd60e51b815260206004820152601360248201527221494e56414c49445f5349474e41545552452160681b6044820152606401610669565b60008181526005602052604090205460ff1615611a225760405162461bcd60e51b815260206004820152600e60248201526d21414c52454144595f555345442160901b6044820152606401610669565b949350505050565b6001600160a01b038316611a8c5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610669565b6000611a96611502565b9050611ac781856000611aa887612477565b611ab187612477565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b038816845290915290205482811015611b445760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610669565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611c1f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611c4c939291906134c0565b6020604051808303816000875af1158015611c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8f91906132d5565b50600083815260046020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611ceb906001613246565b600085815260046020526040902055611a228482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000828152600d60209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b031691830182905261093c91908490612599565b816001600160a01b0316836001600160a01b031603611de95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610669565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000611e638484846118fb565b6000908152600560205260409020805460ff1916600117905550505050565b6001600160a01b038416611ea85760405162461bcd60e51b81526004016106699061347f565b8151835114611ec95760405162461bcd60e51b815260040161066990613305565b6000611ed3611502565b905060005b8451811015611f7057838181518110611ef357611ef3613259565b6020026020010151600080878481518110611f1057611f10613259565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611f589190613246565b90915550819050611f688161326f565b915050611ed8565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611fc19291906133dc565b60405180910390a46109088160008787878761217a565b6001600160a01b038416611ffe5760405162461bcd60e51b81526004016106699061334d565b6000612008611502565b905061201981878761186288612477565b6000848152602081815260408083206001600160a01b038a1684529091529020548381101561205a5760405162461bcd60e51b815260040161066990613392565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612097908490613246565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46120f78288888888886124c2565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b148061213157506001600160e01b031982166303a24d0760e21b145b8061069557506301ffc9a760e01b6001600160e01b0319831614610695565b6007546000906001600160a01b03163303612172575060131936013560601c90565b503390565b90565b6001600160a01b0384163b156111055760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121be90899089908890889088906004016134e7565b6020604051808303816000875af19250505080156121f9575060408051601f3d908101601f191682019092526121f691810190613545565b60015b6122a557612205613562565b806308c379a00361223e575061221961357d565b806122245750612240565b8060405162461bcd60e51b81526004016106699190612ad4565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610669565b6001600160e01b0319811663bc197c8160e01b146120f75760405162461bcd60e51b815260040161066990613606565b606060006122e48360026132a5565b6122ef906002613246565b6001600160401b0381111561230657612306612b6b565b6040519080825280601f01601f191660200182016040528015612330576020820181803683370190505b509050600360fc1b8160008151811061234b5761234b613259565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061237a5761237a613259565b60200101906001600160f81b031916908160001a905350600061239e8460026132a5565b6123a9906001613246565b90505b6001811115612421576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106123dd576123dd613259565b1a60f81b8282815181106123f3576123f3613259565b60200101906001600160f81b031916908160001a90535060049490941c9361241a8161364e565b90506123ac565b5083156124705760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610669565b9392505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106124b1576124b1613259565b602090810291909101015292915050565b6001600160a01b0384163b156111055760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906125069089908990889088908890600401613665565b6020604051808303816000875af1925050508015612541575060408051601f3d908101601f1916820190925261253e91810190613545565b60015b61254d57612205613562565b6001600160e01b0319811663f23a6e6160e01b146120f75760405162461bcd60e51b815260040161066990613606565b600080600061258c85856126b7565b91509150610af081612725565b600083600b546125a99190613246565b600b549091505b818110156126ae5760006125c6826108346132f2565b6125d090866136aa565b6125da9083613246565b6000818152600e602081815260408084208151808301835281546001600160a01b038082168352600160a01b8083046001600160401b039081168589019081528d8b52898952878b20805485166001600160a01b031987168117895581546001600160e01b03199788169091179085900484168502179097558f84168087528e8c52999098528451865498519316979093169690961791169485021790915590519495509390927f11afc9c5046669d0298b87b54340ace1d2a94cc9f363e25585a463a95ca3c79c91a350506001016125b0565b50600b55505050565b60008082516041036126ed5760208301516040840151606085015160001a6126e1878285856128db565b9450945050505061271e565b8251604003612716576020830151604084015161270b8683836129c8565b93509350505061271e565b506000905060025b9250929050565b6000816004811115612739576127396136cc565b036127415750565b6001816004811115612755576127556136cc565b036127a25760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610669565b60028160048111156127b6576127b66136cc565b036128035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610669565b6003816004811115612817576128176136cc565b0361286f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610669565b6004816004811115612883576128836136cc565b03610d115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610669565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561291257506000905060036129bf565b8460ff16601b1415801561292a57508460ff16601c14155b1561293b57506000905060046129bf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561298f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129b8576000600192509250506129bf565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016129e9878288856128db565b935093505050935093915050565b6001600160a01b0381168114610d1157600080fd5b60008060408385031215612a1f57600080fd5b8235612a2a816129f7565b946020939093013593505050565b6001600160e01b031981168114610d1157600080fd5b600060208284031215612a6057600080fd5b813561247081612a38565b600060208284031215612a7d57600080fd5b5035919050565b60005b83811015612a9f578181015183820152602001612a87565b50506000910152565b60008151808452612ac0816020860160208601612a84565b601f01601f19169290920160200192915050565b6020815260006124706020830184612aa8565b60008060408385031215612afa57600080fd5b50508035926020909101359150565b602080825282518282018190526000919060409081850190868401855b82811015612b5e57815180518552868101516001600160a01b0316878601528501518585015260609093019290850190600101612b26565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612ba657612ba6612b6b565b6040525050565b60006001600160401b03821115612bc657612bc6612b6b565b5060051b60200190565b600082601f830112612be157600080fd5b81356020612bee82612bad565b604051612bfb8282612b81565b83815260059390931b8501820192828101915086841115612c1b57600080fd5b8286015b84811015612c365780358352918301918301612c1f565b509695505050505050565b600082601f830112612c5257600080fd5b81356001600160401b03811115612c6b57612c6b612b6b565b604051612c82601f8301601f191660200182612b81565b818152846020838601011115612c9757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215612ccc57600080fd5b8535612cd7816129f7565b94506020860135612ce7816129f7565b935060408601356001600160401b0380821115612d0357600080fd5b612d0f89838a01612bd0565b94506060880135915080821115612d2557600080fd5b612d3189838a01612bd0565b93506080880135915080821115612d4757600080fd5b50612d5488828901612c41565b9150509295509295909350565b60008060408385031215612d7457600080fd5b823591506020830135612d86816129f7565b809150509250929050565b60008060408385031215612da457600080fd5b82356001600160401b0380821115612dbb57600080fd5b818501915085601f830112612dcf57600080fd5b81356020612ddc82612bad565b604051612de98282612b81565b83815260059390931b8501820192828101915089841115612e0957600080fd5b948201945b83861015612e30578535612e21816129f7565b82529482019490820190612e0e565b96505086013592505080821115612e4657600080fd5b50612e5385828601612bd0565b9150509250929050565b600081518084526020808501945080840160005b83811015612e8d57815187529582019590820190600101612e71565b509495945050505050565b6020815260006124706020830184612e5d565b60008060208385031215612ebe57600080fd5b82356001600160401b0380821115612ed557600080fd5b818501915085601f830112612ee957600080fd5b813581811115612ef857600080fd5b8660208260061b8501011115612f0d57600080fd5b60209290920196919550909350505050565b600060208284031215612f3157600080fd5b8135612470816129f7565b600080600060608486031215612f5157600080fd5b8335612f5c816129f7565b92506020840135915060408401356001600160401b03811115612f7e57600080fd5b612f8a86828701612c41565b9150509250925092565b600060208284031215612fa657600080fd5b81356001600160401b038116811461247057600080fd5b8015158114610d1157600080fd5b60008060408385031215612fde57600080fd5b8235612fe9816129f7565b91506020830135612d8681612fbd565b60008083601f84011261300b57600080fd5b5081356001600160401b0381111561302257600080fd5b6020830191508360208260051b850101111561271e57600080fd5b6000806000806040858703121561305357600080fd5b84356001600160401b038082111561306a57600080fd5b61307688838901612ff9565b9096509450602087013591508082111561308f57600080fd5b818701915087601f8301126130a357600080fd5b8135818111156130b257600080fd5b8860208285010111156130c457600080fd5b95989497505060200194505050565b600080604083850312156130e657600080fd5b82356130f1816129f7565b91506020830135612d86816129f7565b60008060006060848603121561311657600080fd5b8335613121816129f7565b9250602084013591506040840135613138816129f7565b809150509250925092565b60008060006040848603121561315857600080fd5b83356001600160401b0381111561316e57600080fd5b61317a86828701612ff9565b909790965060209590950135949350505050565b600080600080600060a086880312156131a657600080fd5b85356131b1816129f7565b945060208601356131c1816129f7565b9350604086013592506060860135915060808601356001600160401b038111156131ea57600080fd5b612d5488828901612c41565b600181811c9082168061320a57607f821691505b60208210810361322a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069557610695613230565b634e487b7160e01b600052603260045260246000fd5b60006001820161328157613281613230565b5060010190565b60208082526003908201526234303360e81b604082015260600190565b808202811582820484141761069557610695613230565b6000602082840312156132ce57600080fd5b5051919050565b6000602082840312156132e757600080fd5b815161247081612fbd565b8181038181111561069557610695613230565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006133ef6040830185612e5d565b82810360208401526134018185612e5d565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613442816017850160208801612a84565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613473816028840160208801612a84565b01602801949350505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60018060a01b03841681528260208201526060604082015260006134016060830184612aa8565b6001600160a01b0386811682528516602082015260a06040820181905260009061351390830186612e5d565b82810360608401526135258186612e5d565b905082810360808401526135398185612aa8565b98975050505050505050565b60006020828403121561355757600080fd5b815161247081612a38565b600060033d11156121775760046000803e5060005160e01c90565b600060443d101561358b5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156135ba57505050505090565b82850191508151818111156135d25750505050505090565b843d87010160208285010111156135ec5750505050505090565b6135fb60208286010187612b81565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60008161365d5761365d613230565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061369f90830184612aa8565b979650505050505050565b6000826136c757634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ac2590cd0ec2b68521ffc746d98776f36654aef7d081af59b2761ec981e52d6d64736f6c63430008110033697066733a2f2f516d504b6652325366414242336e3750373173783669553665664772364e33653774424b72446e5a4a5653384b502f7b69647d2e6a736f6ef86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f10000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae00000000000000000000000002f12cd9f400312da163f0e6ad622c9db2e471e440000000000000000000000006415ba6b71de7ca5ddcb5c996515cf37aa4372e2

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061021b5760003560e01c80638da5cb5b11610125578063c7e42b1b116100ad578063eaa626c91161007c578063eaa626c914610598578063eb924a67146105ab578063eedac3a6146105be578063f242432a146105e5578063ff936407146105f857600080fd5b8063c7e42b1b14610523578063d547741f14610536578063da74222814610549578063e985e9c51461055c57600080fd5b806394985ddd116100f457806394985ddd146104d9578063a217fddf146104ec578063a22cb465146104f4578063b757e60a14610507578063c1bd8cf91461051a57600080fd5b80638da5cb5b14610497578063902d55a5146104aa5780639199a61c146104b357806391d14854146104c657600080fd5b806336568abe116101a8578063572b6c0511610177578063572b6c05146103ea57806361e93b9d1461040c5780636c19e783146104475780638838b5c314610473578063890621da1461048457600080fd5b806336568abe146103425780634e1273f4146103555780634f64b2be1461037557806356725390146103d757600080fd5b8063195e8708116101ef578063195e8708146102a957806319d7324e146102cc578063248a9ca3146102f75780632eb2c2d61461031a5780632f2ff15d1461032f57600080fd5b8062fdd58e1461022057806301ffc9a7146102465780630e89341c14610269578063127d0d0814610289575b600080fd5b61023361022e366004612a0c565b610601565b6040519081526020015b60405180910390f35b610259610254366004612a4e565b61069b565b604051901515815260200161023d565b61027c610277366004612a6b565b6106a6565b60405161023d9190612ad4565b61029c610297366004612ae7565b61073a565b60405161023d9190612b09565b6102596102b7366004612a6b565b60056020526000908152604090205460ff1681565b600a546102df906001600160a01b031681565b6040516001600160a01b03909116815260200161023d565b610233610305366004612a6b565b60009081526003602052604090206001015490565b61032d610328366004612cb4565b610866565b005b61032d61033d366004612d61565b61090f565b61032d610350366004612d61565b610941565b610368610363366004612d91565b6109cf565b60405161023d9190612e98565b6103b0610383366004612a6b565b600e602052600090815260409020546001600160a01b03811690600160a01b90046001600160401b031682565b604080516001600160a01b0390931683526001600160401b0390911660208301520161023d565b61032d6103e5366004612eab565b610af8565b6102596103f8366004612f1f565b6007546001600160a01b0391821691161490565b6103b061041a366004612a6b565b600d602052600090815260409020546001600160a01b03811690600160a01b90046001600160401b031682565b61032d610455366004612f1f565b600680546001600160a01b0319166001600160a01b03831617905550565b6006546001600160a01b03166102df565b610259610492366004612f3c565b610d14565b6008546102df906001600160a01b031681565b61023361083481565b61032d6104c1366004612f94565b610d2c565b6102596104d4366004612d61565b610e17565b61032d6104e7366004612ae7565b610e42565b610233600081565b61032d610502366004612fcb565b610ec4565b61032d61051536600461303d565b610ed6565b610233600c5481565b61032d610531366004612f1f565b61110d565b61032d610544366004612d61565b611256565b61032d610557366004612f1f565b61127e565b61025961056a3660046130d3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102336105a6366004613101565b6112ca565b61032d6105b9366004613143565b611311565b6102df7f000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f181565b61032d6105f336600461318e565b611444565b610233600b5481565b60006001600160a01b0383166106725760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610695826114dd565b6060600280546106b5906131f6565b80601f01602080910402602001604051908101604052809291908181526020018280546106e1906131f6565b801561072e5780601f106107035761010080835404028352916020019161072e565b820191906000526020600020905b81548152906001019060200180831161071157829003601f168201915b50505050509050919050565b6060816001600160401b0381111561075457610754612b6b565b60405190808252806020026020018201604052801561079f57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816107725790505b50905060006107af836001613246565b9050835b8181101561085e576000818152600e60209081526040918290208251808401845290546001600160a01b03808216808452600160a01b9092046001600160401b03168385018190528551606081018752818152948501839052600a5493959294909390928301916108289186918691166112ca565b81525086858151811061083d5761083d613259565b602002602001018190525050505080806108569061326f565b9150506107b3565b505092915050565b61086e611502565b6001600160a01b0316856001600160a01b0316148061089457506108948561056a611502565b6108fb5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610669565b6109088585858585611511565b5050505050565b6000828152600360205260409020600101546109328161092d611502565b6116b0565b61093c8383611714565b505050565b610949611502565b6001600160a01b0316816001600160a01b0316146109c15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610669565b6109cb828261179b565b5050565b60608151835114610a345760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610669565b600083516001600160401b03811115610a4f57610a4f612b6b565b604051908082528060200260200182016040528015610a78578160200160208202803683370190505b50905060005b8451811015610af057610ac3858281518110610a9c57610a9c613259565b6020026020010151858381518110610ab657610ab6613259565b6020026020010151610601565b828281518110610ad557610ad5613259565b6020908102919091010152610ae98161326f565b9050610a7e565b509392505050565b6008546001600160a01b03163314610b225760405162461bcd60e51b815260040161066990613288565b6009548190610b329082906132a5565b6040516370a0823160e01b81523060048201527f000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f16001600160a01b0316906370a0823190602401602060405180830381865afa158015610b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bba91906132bc565b1015610bfa5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610669565b60005b81811015610d0b5736848483818110610c1857610c18613259565b9050604002019050610834816020016020810190610c369190612f94565b6001600160401b0316600c54610c4c9190613246565b1115610c9a5760405162461bcd60e51b815260206004820152601e60248201527f4d696e742070617373206578636565647320746f6b656e20737570706c7900006044820152606401610669565b610cda610caa6020830183612f1f565b610cba6040840160208501612f94565b6001600160401b0316600160405180602001604052806000815250611820565b600190910190610cf06040820160208301612f94565b600c80546001600160401b0392909216909101905550610bfd565b50505050565b50565b6000610d218484846118fb565b506001949350505050565b610d48610d37611502565b826001600160401b03166001611a2a565b6000610d767ff86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da600954611baf565b90506040518060400160405280610d8b611502565b6001600160a01b0390811682526001600160401b038581166020938401526000858152600d8452604090819020855181549686015194166001600160e01b031990961695909517600160a01b93909216929092021790925590518281527fe5f5b44d72d4143c278eb745c4acc0695c4a5bc616be5beecf46abe29661780e910160405180910390a15050565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b336001600160a01b037f0000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae01614610eba5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610669565b6109cb8282611d2b565b6109cb610ecf611502565b8383611d76565b60008085858080602002602001604051908101604052809392919081815260200183836020028082843760009201829052509394505050505b8581101561100e57868682818110610f2957610f29613259565b9050602002013560011480610f565750868682818110610f4b57610f4b613259565b905060200201356003145b80610f795750868682818110610f6e57610f6e613259565b905060200201356005145b610fb75760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081c1858dac81251608a1b6044820152606401610669565b868682818110610fc957610fc9613259565b9050602002013583610fdb9190613246565b92506001828281518110610ff157610ff1613259565b6020908102919091010152806110068161326f565b915050610f0f565b5061105761101a611502565b8386868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e5692505050565b6110ab611062611502565b878780806020026020016040519081016040528093929190818152602001838360200280828437600092018290525060408051602081019091529081528793509150611e829050565b81600c60008282546110bd9190613246565b9091555050600c5461083410156111055760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081b5a5b9d60a21b6044820152606401610669565b505050505050565b6008546001600160a01b031633146111375760405162461bcd60e51b815260040161066990613288565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a991906132bc565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156111f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121891906132d5565b610d115760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610669565b6000828152600360205260409020600101546112748161092d611502565b61093c838361179b565b6008546001600160a01b031633146112a85760405162461bcd60e51b815260040161066990613288565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b03808616602083015291810184905290821660608201526000906080016040516020818303038152906040528051906020012090509392505050565b6008546001600160a01b0316331461133b5760405162461bcd60e51b815260040161066990613288565b6000818152600e6020526040902054600160a01b90046001600160401b0316156113985760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481dd85c9b595960921b6044820152606401610669565b60006113a48383613246565b9050815b8181101561090857600085856113be86856132f2565b8181106113cd576113cd613259565b90506020020160208101906113e29190612f94565b60408051808201825260008082526001600160401b039384166020808401918252878352600e9052929020905181549251909316600160a01b026001600160e01b03199092166001600160a01b039390931692909217179055506001016113a8565b61144c611502565b6001600160a01b0316856001600160a01b0316148061147257506114728561056a611502565b6114d05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610669565b6109088585858585611fd8565b60006001600160e01b03198216637965db0b60e01b1480610695575061069582612100565b600061150c612150565b905090565b81518351146115325760405162461bcd60e51b815260040161066990613305565b6001600160a01b0384166115585760405162461bcd60e51b81526004016106699061334d565b6000611562611502565b905060005b845181101561164a57600085828151811061158457611584613259565b6020026020010151905060008583815181106115a2576115a2613259565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156115f25760405162461bcd60e51b815260040161066990613392565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061162f908490613246565b92505081905550505050806116439061326f565b9050611567565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161169a9291906133dc565b60405180910390a461110581878787878761217a565b6116ba8282610e17565b6109cb576116d2816001600160a01b031660146122d5565b6116dd8360206122d5565b6040516020016116ee92919061340a565b60408051601f198184030181529082905262461bcd60e51b825261066991600401612ad4565b61171e8282610e17565b6109cb5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611757611502565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6117a58282610e17565b156109cb5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff191690556117dc611502565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6001600160a01b0384166118465760405162461bcd60e51b81526004016106699061347f565b6000611850611502565b905061186b8160008761186288612477565b61090888612477565b6000848152602081815260408083206001600160a01b03891684529091528120805485929061189b908490613246565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610908816000878787876124c2565b60008061195f61190c8686306112ca565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506119736006546001600160a01b031690565b6001600160a01b0316611986828561257d565b6001600160a01b0316146119d25760405162461bcd60e51b815260206004820152601360248201527221494e56414c49445f5349474e41545552452160681b6044820152606401610669565b60008181526005602052604090205460ff1615611a225760405162461bcd60e51b815260206004820152600e60248201526d21414c52454144595f555345442160901b6044820152606401610669565b949350505050565b6001600160a01b038316611a8c5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610669565b6000611a96611502565b9050611ac781856000611aa887612477565b611ab187612477565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b038816845290915290205482811015611b445760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610669565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60007f000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f16001600160a01b0316634000aea07f0000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae084866000604051602001611c1f929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611c4c939291906134c0565b6020604051808303816000875af1158015611c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8f91906132d5565b50600083815260046020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611ceb906001613246565b600085815260046020526040902055611a228482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000828152600d60209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b031691830182905261093c91908490612599565b816001600160a01b0316836001600160a01b031603611de95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610669565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000611e638484846118fb565b6000908152600560205260409020805460ff1916600117905550505050565b6001600160a01b038416611ea85760405162461bcd60e51b81526004016106699061347f565b8151835114611ec95760405162461bcd60e51b815260040161066990613305565b6000611ed3611502565b905060005b8451811015611f7057838181518110611ef357611ef3613259565b6020026020010151600080878481518110611f1057611f10613259565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611f589190613246565b90915550819050611f688161326f565b915050611ed8565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611fc19291906133dc565b60405180910390a46109088160008787878761217a565b6001600160a01b038416611ffe5760405162461bcd60e51b81526004016106699061334d565b6000612008611502565b905061201981878761186288612477565b6000848152602081815260408083206001600160a01b038a1684529091529020548381101561205a5760405162461bcd60e51b815260040161066990613392565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612097908490613246565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46120f78288888888886124c2565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b148061213157506001600160e01b031982166303a24d0760e21b145b8061069557506301ffc9a760e01b6001600160e01b0319831614610695565b6007546000906001600160a01b03163303612172575060131936013560601c90565b503390565b90565b6001600160a01b0384163b156111055760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906121be90899089908890889088906004016134e7565b6020604051808303816000875af19250505080156121f9575060408051601f3d908101601f191682019092526121f691810190613545565b60015b6122a557612205613562565b806308c379a00361223e575061221961357d565b806122245750612240565b8060405162461bcd60e51b81526004016106699190612ad4565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610669565b6001600160e01b0319811663bc197c8160e01b146120f75760405162461bcd60e51b815260040161066990613606565b606060006122e48360026132a5565b6122ef906002613246565b6001600160401b0381111561230657612306612b6b565b6040519080825280601f01601f191660200182016040528015612330576020820181803683370190505b509050600360fc1b8160008151811061234b5761234b613259565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061237a5761237a613259565b60200101906001600160f81b031916908160001a905350600061239e8460026132a5565b6123a9906001613246565b90505b6001811115612421576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106123dd576123dd613259565b1a60f81b8282815181106123f3576123f3613259565b60200101906001600160f81b031916908160001a90535060049490941c9361241a8161364e565b90506123ac565b5083156124705760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610669565b9392505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106124b1576124b1613259565b602090810291909101015292915050565b6001600160a01b0384163b156111055760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906125069089908990889088908890600401613665565b6020604051808303816000875af1925050508015612541575060408051601f3d908101601f1916820190925261253e91810190613545565b60015b61254d57612205613562565b6001600160e01b0319811663f23a6e6160e01b146120f75760405162461bcd60e51b815260040161066990613606565b600080600061258c85856126b7565b91509150610af081612725565b600083600b546125a99190613246565b600b549091505b818110156126ae5760006125c6826108346132f2565b6125d090866136aa565b6125da9083613246565b6000818152600e602081815260408084208151808301835281546001600160a01b038082168352600160a01b8083046001600160401b039081168589019081528d8b52898952878b20805485166001600160a01b031987168117895581546001600160e01b03199788169091179085900484168502179097558f84168087528e8c52999098528451865498519316979093169690961791169485021790915590519495509390927f11afc9c5046669d0298b87b54340ace1d2a94cc9f363e25585a463a95ca3c79c91a350506001016125b0565b50600b55505050565b60008082516041036126ed5760208301516040840151606085015160001a6126e1878285856128db565b9450945050505061271e565b8251604003612716576020830151604084015161270b8683836129c8565b93509350505061271e565b506000905060025b9250929050565b6000816004811115612739576127396136cc565b036127415750565b6001816004811115612755576127556136cc565b036127a25760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610669565b60028160048111156127b6576127b66136cc565b036128035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610669565b6003816004811115612817576128176136cc565b0361286f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610669565b6004816004811115612883576128836136cc565b03610d115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610669565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561291257506000905060036129bf565b8460ff16601b1415801561292a57508460ff16601c14155b1561293b57506000905060046129bf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561298f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129b8576000600192509250506129bf565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016129e9878288856128db565b935093505050935093915050565b6001600160a01b0381168114610d1157600080fd5b60008060408385031215612a1f57600080fd5b8235612a2a816129f7565b946020939093013593505050565b6001600160e01b031981168114610d1157600080fd5b600060208284031215612a6057600080fd5b813561247081612a38565b600060208284031215612a7d57600080fd5b5035919050565b60005b83811015612a9f578181015183820152602001612a87565b50506000910152565b60008151808452612ac0816020860160208601612a84565b601f01601f19169290920160200192915050565b6020815260006124706020830184612aa8565b60008060408385031215612afa57600080fd5b50508035926020909101359150565b602080825282518282018190526000919060409081850190868401855b82811015612b5e57815180518552868101516001600160a01b0316878601528501518585015260609093019290850190600101612b26565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612ba657612ba6612b6b565b6040525050565b60006001600160401b03821115612bc657612bc6612b6b565b5060051b60200190565b600082601f830112612be157600080fd5b81356020612bee82612bad565b604051612bfb8282612b81565b83815260059390931b8501820192828101915086841115612c1b57600080fd5b8286015b84811015612c365780358352918301918301612c1f565b509695505050505050565b600082601f830112612c5257600080fd5b81356001600160401b03811115612c6b57612c6b612b6b565b604051612c82601f8301601f191660200182612b81565b818152846020838601011115612c9757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215612ccc57600080fd5b8535612cd7816129f7565b94506020860135612ce7816129f7565b935060408601356001600160401b0380821115612d0357600080fd5b612d0f89838a01612bd0565b94506060880135915080821115612d2557600080fd5b612d3189838a01612bd0565b93506080880135915080821115612d4757600080fd5b50612d5488828901612c41565b9150509295509295909350565b60008060408385031215612d7457600080fd5b823591506020830135612d86816129f7565b809150509250929050565b60008060408385031215612da457600080fd5b82356001600160401b0380821115612dbb57600080fd5b818501915085601f830112612dcf57600080fd5b81356020612ddc82612bad565b604051612de98282612b81565b83815260059390931b8501820192828101915089841115612e0957600080fd5b948201945b83861015612e30578535612e21816129f7565b82529482019490820190612e0e565b96505086013592505080821115612e4657600080fd5b50612e5385828601612bd0565b9150509250929050565b600081518084526020808501945080840160005b83811015612e8d57815187529582019590820190600101612e71565b509495945050505050565b6020815260006124706020830184612e5d565b60008060208385031215612ebe57600080fd5b82356001600160401b0380821115612ed557600080fd5b818501915085601f830112612ee957600080fd5b813581811115612ef857600080fd5b8660208260061b8501011115612f0d57600080fd5b60209290920196919550909350505050565b600060208284031215612f3157600080fd5b8135612470816129f7565b600080600060608486031215612f5157600080fd5b8335612f5c816129f7565b92506020840135915060408401356001600160401b03811115612f7e57600080fd5b612f8a86828701612c41565b9150509250925092565b600060208284031215612fa657600080fd5b81356001600160401b038116811461247057600080fd5b8015158114610d1157600080fd5b60008060408385031215612fde57600080fd5b8235612fe9816129f7565b91506020830135612d8681612fbd565b60008083601f84011261300b57600080fd5b5081356001600160401b0381111561302257600080fd5b6020830191508360208260051b850101111561271e57600080fd5b6000806000806040858703121561305357600080fd5b84356001600160401b038082111561306a57600080fd5b61307688838901612ff9565b9096509450602087013591508082111561308f57600080fd5b818701915087601f8301126130a357600080fd5b8135818111156130b257600080fd5b8860208285010111156130c457600080fd5b95989497505060200194505050565b600080604083850312156130e657600080fd5b82356130f1816129f7565b91506020830135612d86816129f7565b60008060006060848603121561311657600080fd5b8335613121816129f7565b9250602084013591506040840135613138816129f7565b809150509250925092565b60008060006040848603121561315857600080fd5b83356001600160401b0381111561316e57600080fd5b61317a86828701612ff9565b909790965060209590950135949350505050565b600080600080600060a086880312156131a657600080fd5b85356131b1816129f7565b945060208601356131c1816129f7565b9350604086013592506060860135915060808601356001600160401b038111156131ea57600080fd5b612d5488828901612c41565b600181811c9082168061320a57607f821691505b60208210810361322a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561069557610695613230565b634e487b7160e01b600052603260045260246000fd5b60006001820161328157613281613230565b5060010190565b60208082526003908201526234303360e81b604082015260600190565b808202811582820484141761069557610695613230565b6000602082840312156132ce57600080fd5b5051919050565b6000602082840312156132e757600080fd5b815161247081612fbd565b8181038181111561069557610695613230565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006133ef6040830185612e5d565b82810360208401526134018185612e5d565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613442816017850160208801612a84565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613473816028840160208801612a84565b01602801949350505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60018060a01b03841681528260208201526060604082015260006134016060830184612aa8565b6001600160a01b0386811682528516602082015260a06040820181905260009061351390830186612e5d565b82810360608401526135258186612e5d565b905082810360808401526135398185612aa8565b98975050505050505050565b60006020828403121561355757600080fd5b815161247081612a38565b600060033d11156121775760046000803e5060005160e01c90565b600060443d101561358b5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156135ba57505050505090565b82850191508151818111156135d25750505050505090565b843d87010160208285010111156135ec5750505050505090565b6135fb60208286010187612b81565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60008161365d5761365d613230565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061369f90830184612aa8565b979650505050505050565b6000826136c757634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ac2590cd0ec2b68521ffc746d98776f36654aef7d081af59b2761ec981e52d6d64736f6c63430008110033

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

f86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f10000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae00000000000000000000000002f12cd9f400312da163f0e6ad622c9db2e471e440000000000000000000000006415ba6b71de7ca5ddcb5c996515cf37aa4372e2

-----Decoded View---------------
Arg [0] : _LINK_KEY_HASH (bytes32): 0xf86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da
Arg [1] : _LINK_ADDRESS (address): 0xb0897686c545045aFc77CF20eC7A532E3120E0F1
Arg [2] : _LINK_VRF_COORDINATOR_ADDRESS (address): 0x3d2341ADb2D31f1c5530cDC622016af293177AE0
Arg [3] : _trustedForwarder (address): 0x2F12Cd9f400312dA163F0e6aD622C9db2e471e44
Arg [4] : firstEditionWrasslers (address): 0x6415bA6B71De7Ca5DDcb5C996515cF37aA4372e2

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : f86195cf7690c55907b2b611ebb7343a6f649bff128701cc542f0569e2c549da
Arg [1] : 000000000000000000000000b0897686c545045afc77cf20ec7a532e3120e0f1
Arg [2] : 0000000000000000000000003d2341adb2d31f1c5530cdc622016af293177ae0
Arg [3] : 0000000000000000000000002f12cd9f400312da163f0e6ad622c9db2e471e44
Arg [4] : 0000000000000000000000006415ba6b71de7ca5ddcb5c996515cf37aa4372e2


Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.